React Developer Tools
Learn to install and use the React Developer Tools browser extension to inspect the component tree, view live props and state, and profile renders.
Introduction
The previous lesson talked about measuring before optimizing, without saying exactly how to measure. That is the job of the React Developer Tools — a free browser extension that lets you see the component tree, inspect live props and state, and record exactly which components rendered and why during any interaction.
This lesson covers installing the extension and using its two main tabs, Components and Profiler, to turn the performance concepts from the last lesson into something you can actually observe in a running app.
- How to install the React Developer Tools browser extension.
- How to use the Components tab to inspect the tree, view props/state, and search by name.
- How to use the Profiler tab to record a session and see which components re-rendered and why.
- How to use both tabs together to diagnose the kinds of performance problems from the previous lesson.
Installing React Developer Tools
React Developer Tools is available as a browser extension for Chrome, Firefox, and Edge, published by the React team. Once installed, it adds two new panels — Components and Profiler — to your browser's developer tools, right alongside Elements, Console, and Network.
Chrome / Edge
Install "React Developer Tools" from the Chrome Web Store; it works in any Chromium-based browser.
Firefox
The same extension is available through Firefox Add-ons.
Auto-Detection
The extension automatically detects whether a page is running React, and the icon lights up when it does.
New DevTools Panels
Once installed, open your browser's DevTools and look for the new "Components" and "Profiler" tabs.
The extension shows the most useful information — readable component names, prop and state values — when the app is running in development mode. Production builds are often minified, which makes component names harder to read.
The Components Tab
The Components tab shows the actual React component tree — not just the raw HTML, but the components you wrote, nested exactly as they appear in your code. Selecting any component reveals its current props, state, and hooks in a side panel.
Component Tree
Navigate the full tree of components, expanding and collapsing branches just like a file explorer.
Search by Name
Type a component name into the search box to jump straight to it, which is invaluable in a large app.
Live Props & State
Selecting a component shows its current props and state values, updated live as the app runs.
Editing Values
Many prop and state values can be edited directly in the panel, letting you test how the UI responds without changing code.
For example, selecting a `Counter` component in the tree might show `state: { count: 4 }` in the side panel — and clicking that value lets you change it to `10` on the spot, instantly seeing the UI update, without touching a single line of code.
The Profiler Tab
While the Components tab shows a snapshot, the Profiler tab shows behavior over time. You start a recording, interact with the app (click a button, type in a search box), stop the recording, and the Profiler shows exactly which components rendered during that window, how long each render took, and — critically — why each one rendered.
1. Open the Profiler tab
2. Click the record button (a circle icon)
3. Interact with your app as usual
4. Click the record button again to stop
5. Review the flame chart / ranked chart of rendersRecord a Session
Start recording, perform an interaction, then stop — the Profiler captures every render that happened in between.
Flame Chart
A visual chart where wider bars represent components that took longer to render during that commit.
"Why did this render?"
The Profiler can show the reason a component re-rendered — for example, because props changed or a hook's state changed.
Spotting Expensive Renders
Components that render often or take unusually long stand out visually, flagging exactly where to focus optimization work.
Example: Diagnosing an Unnecessary Re-Render
Recall the Dashboard/ExpensiveList example from the previous lesson, before any memoization was added. Here is how you would actually confirm the problem using these tools rather than guessing.
function Dashboard() {
const [search, setSearch] = useState("");
const items = useProductList();
return (
<div>
<input value={search} onChange={(e) => setSearch(e.target.value)} />
<ExpensiveList items={items} />
</div>
);
}1. Open the Profiler tab and start recording.
2. Type a few characters into the search input.
3. Stop recording.
4. In the flame chart, ExpensiveList appears on every commit,
even though only the input's value actually changed.
5. Selecting ExpensiveList shows the reason: "parent re-rendered."
6. This confirms ExpensiveList is a good candidate for React.memo.Typing in the search input now only shows Dashboard and the input
rendering on the flame chart. ExpensiveList no longer appears in
those commits at all.The most reliable workflow is to profile first to confirm a real problem, apply one targeted change, then profile again to confirm it actually helped. This turns performance work from guesswork into a measurable loop.
Common Mistakes
- Profiling a production build without realizing minified component names make the results hard to read.
- Applying a fix based on a hunch without ever opening the Profiler to confirm the problem first.
- Ignoring the "why did this render" information the Profiler provides, which usually points directly at the cause.
- Forgetting that the Components tab shows live values — editing state there is temporary and does not change your source code.
- Not searching by component name in a large tree, and instead scrolling manually through hundreds of nodes.
Best Practices
- Keep the app running in development mode while profiling for the most readable results.
- Use the Components tab search to jump directly to the component you are investigating.
- Record short, focused Profiler sessions around a single interaction rather than long, noisy ones.
- Always re-profile after applying an optimization to confirm it actually reduced renders or render time.
- Combine the Profiler's "why did this render" info with the techniques from the previous lesson to choose the right fix.
Frequently Asked Questions
Does React Developer Tools work on any website?
It only activates fully on pages built with React — the extension detects React on the page and enables the Components and Profiler tabs accordingly.
Can I edit state directly in the Components tab?
Yes, many values are editable inline in the side panel, which is a quick way to test how the UI reacts to different state without changing code — though the change is temporary and not saved back to your source.
Does the Profiler slow down my app?
Recording does add a small overhead while active, which is expected and generally negligible for diagnosing everyday performance issues. It should not be left recording indefinitely in a real user's session.
What does "why did this render" actually tell me?
It reports the specific trigger for a given commit — for example, that a hook's state changed, that props changed, or that the parent simply re-rendered — which tells you exactly which optimization (memo, useMemo, useCallback) is relevant.
Should I profile in production?
You can use a production profiling build, but the default production build strips information the Profiler relies on for readability. For day-to-day diagnosis, profiling in development is simpler and gives clearer component names.
Key Takeaways
- React Developer Tools is a free browser extension adding Components and Profiler panels to DevTools.
- The Components tab shows the live component tree, props, state, and lets you search by name.
- The Profiler tab records a session and reveals which components rendered, how long they took, and why.
- These tools turn the performance techniques from the previous lesson into evidence-based decisions.
- The reliable workflow is: profile, apply one change, profile again to confirm it helped.
Summary
The React Developer Tools extension closes the loop that the previous lesson opened: instead of guessing which component is slow or why it re-rendered, you can watch it happen directly, inspect live props and state in the Components tab, and record exactly what happened during an interaction in the Profiler tab.
In this lesson, you installed the extension and learned to navigate the component tree, inspect and edit live values, and record and interpret a Profiler session. Next, and finally, you will learn how to build and deploy a React application so real users can use it.
- You can install and open the React Developer Tools extension.
- You can navigate the Components tab to inspect and edit live props and state.
- You can record and read a Profiler session to see what rendered and why.
- You can use both tabs together to confirm and fix a real performance problem.