React Quantum parses through your React application to create a color-coded tree model of its component hierarchy. On hover, each…
React Quantum parses through your React application to create a color-coded tree model of its component hierarchy. On hover, each tree node will display two key component performance metrics—render time and re-render frequency—as well as memoized state and props to indicate what, specifically, initiated the render.
The beauty is in the heat map: Nodes will change color depending on the component's rendering performance, making it easy to pinpoint possible bottlenecks at a glance. 🔥
How it works
- React Quantum utilizes the React Devtool to extract information about your React App.
- Please ensure your project is running on React 16.0+ and that you have the React Devtool installed before using React Quantum.
- Due to the minification of component names during bundling, React Quantum works best with your project bundled in development mode.
1. Open Chrome Developer Tools (Inspect) on any page that uses React, and click on React Quantum at the top of the Developer Tools panel. Upon pressing ‘Start Quantum’, a persistent connection is open and stored on the background page.
2. Refresh the page or set state to trigger a re-render. As the user interacts with the React application, the Mutation Observer listens for changes to the DOM and triggers a script injection to extract and parse the page’s fiber tree.
3. Hover over a node to view information like Component Name, Type, Commit Frequency, Render Time, Current State, and Props.
4. React Quantum runs with heatmap values out-of-the-box, but users could opt to customize their heatmap with percentage inputs at the top of the tree.