liveBook · Manning

Components inspector

As explained in React in Depth

The React Developer Tools components inspector is an inspection interface for examining React components, their properties, state, and hierarchy.

The React Developer Tools components inspector is a live debugging interface for examining the rendered component tree rather than static source. It exposes component relationships, properties, stateful hooks, memoization, and rendering activity while the application runs. section 4.4.1 section 4.5

Use the inspector to:

  • Inspect the complete component tree, optionally including HTML nodes. section 4.4.3
  • Select components visually, search the tree, and filter matching nodes, including regular-expression searches. section 4.4.3
  • View component properties, identify memoized nodes, and modify supported props directly. section 4.4.3
  • Inspect and manipulate values managed by useState and useReducer, while context values remain view-only. section 4.4.3
  • Highlight rendering components to investigate which parts of the tree update. section 4.4.1

Dark-mode application

Connect React Developer Tools to a dark-mode application using React context, memoization, and hooks. Select components such as Title or Header, inspect their properties and memoized status, then edit a string or Boolean and observe the immediate re-render. Select a stateful component to change its hook value directly; run the example with `$ npm run dev -w ch04/dark-mode`. section 4.4.3

How React in Depth covers it

How deep it goes
Explains tree inspection, filtering, prop and hook manipulation, and rendering highlights, while deferring specialized performance analysis to the profiler.
Examples
Uses a dark-mode application with React context, memoized components, Title, props, and stateful hooks.
What you can do after
Diagnose React behavior by locating components, examining values, changing supported props or hook state, and observing re-renders.
How it connects
Connects component trees with props, stateful hooks, React context, memoization, rendering, debugging, and profiling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of React in Depth. The section links point to the parts of the book it draws on.