ReactEasy

What is React DevTools?

React DevTools is the official browser extension (Chrome, Firefox, Edge) and standalone app for inspecting React apps. Its Components tab shows the component tree with props, state, hooks and context, and its Profiler tab records renders to show what rendered, why, and how long it took.

Components tab

  • Browse the tree and search by name.
  • Inspect and edit props, state and hook values live.
  • See the owner chain ("rendered by").
  • Jump to the source of a component.
  • Force Suspense fallbacks and error boundaries to test those states.
  • Server Components (in frameworks) appear with a badge.
  • Components optimized by the React Compiler show a "Memo ✨" badge.

Profiler tab

  • Record an interaction and see each commit, flame charts and ranked render times.
  • "Why did this render?" (enable in settings) shows which props, state or hooks changed.
  • "Highlight updates when components render" flashes components as they re-render.

Chrome Performance tracks (React 19.2)

React adds custom tracks to the Chrome DevTools Performance panel: a Scheduler track (priorities, blocking vs transition work) and a Components track (which components rendered and their effects).

Tips

  • Works best with development builds; production profiling needs a profiling build.
  • React Native uses React Native DevTools; standalone react-devtools works for other environments.

Code example

tsx
1// Make components easy to find in DevTools
2
3// 1. Named function components show their name (anonymous arrows show "Anonymous")
4export function PricingTable() {
5 return <table />;
6}
7
8// 2. Custom hooks can label their value in DevTools
9import { useDebugValue, useSyncExternalStore } from "react";
10
11export function useOnlineStatus() {
12 const online = useSyncExternalStore(
13 (cb) => {
14 window.addEventListener("online", cb);
15 window.addEventListener("offline", cb);
16 return () => {
17 window.removeEventListener("online", cb);
18 window.removeEventListener("offline", cb);
19 };
20 },
21 () => navigator.onLine,
22 () => true
23 );
24 useDebugValue(online ? "Online" : "Offline"); // shown next to the hook in DevTools
25 return online;
26}

Practice this question

Open it in the study app to track progress, take notes, listen to the answer and work through the rest of the React set.

Open in study app