React Developer Tools is an official browser extension created by the React core team (available for Chrome, Firefox, and Edge).
While standard browser DevTools (Elements, Console, Network) inspect the physical HTML DOM, React DevTools allows you to inspect the actual React Component Hierarchy , including props, state, hooks, context, and render performance.
1 Standard Browser DevTools:
2 Shows: <div class="card"><button class="btn">...</button></div> (Flat HTML DOM)
3
4 React Developer Tools:
5 Shows: <CourseDirectory> ──> <CourseCard title="React"> ──> <Button> (Component Tree)
Once installed, React DevTools adds two new panels to your browser developer tools:
Tab 1: Components Component Tree: Browse the hierarchical tree of React components exactly as structured in your source code.Inspect Props & State: Click any component in the tree to view and modify its current props, state, and hooks in real time.Source Link: Click the <> icon to jump directly to the component's source code file in your IDE or browser sources.Search & Filter: Search for components by name or filter out host DOM nodes.Tab 2: Profiler Record rendering performance and flame graphs. Discover which components re-rendered, why they re-rendered ("What caused this to render?"), and how many milliseconds each render took. One of the most powerful diagnostic features in React DevTools is "Highlight updates when components render" :
1 Open React DevTools -> Click the Settings Gear icon.
2 Under the General tab, check "Highlight updates when components render."
3 Interact with your application.
Whenever a component re-renders, a colored rectangle flashes around it in the viewport:
Green: Fast / normal re-render.Yellow / Red: Frequent or computationally heavy re-render.This immediately exposes unintended re-render cascades across your interface.
When you select any component in the Components tab:
React DevTools automatically assigns that component instance to a global console variable named $r . Switch to the Console tab and type $r to inspect its props, state, and methods directly in JavaScript! 1 // In Browser Console:
2 $r . props // Inspect current props of selected component
3 $r . state // Inspect current state of selected component
Interactive Quiz • Knowledge Check
Practice Quiz What is the primary purpose of the React Developer Tools extension?
A To edit Photoshop images inside the browser
B To inspect and debug the React component hierarchy, props, state, and performance
C To monitor MySQL database queries
D To generate SSL security certificates
What are the two primary panels added by React DevTools to browser developer tools?
A Elements and Console
B Components and Profiler
C Network and Application
D Sources and Security
What happens when you enable "Highlight updates when components render" in React DevTools settings?
A The entire webpage turns black and white
B Visual colored borders flash around components on the screen whenever they re-render
C The browser saves a video recording of the screen
D React disables all console logs
When a component is selected in the React DevTools Components tab, what special variable is made available in the JavaScript console?
A $0
B $r
C $$react
D window.component
Can you edit component state directly in React DevTools to test different UI scenarios?
A No, DevTools is strictly read-only
B Yes, you can modify props and state values in the right-hand panel of the Components tab and observe instant UI updates
C Only in Firefox Nightly
D Only if the app is deployed to production