You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a749eb6
Browse filesBrowse the repository at this point in the historyBrowse files
*`react_get_trace_overview`: Returns a summary of every commit in a recording.
351
+
*`react_get_commit_report`: Returns which components rendered in a commit and how long each took.
352
352
353
353
Components are identified by short, stable uids like `"r5"`. A uid stays the same across every tool and across re-renders, but not across page reloads.
354
354
355
355
Every tool returns a plain, serializable object. If a tool fails, it returns an object with an `error` message instead.
*`hooks` is only returned for function, `forwardRef`, and `memo` components.
424
-
* Prop and Hook values are normalized so they can be serialized.
425
-
* To read Hook values, React DevTools calls the component's render function again. Effects don't run, but side effects in the render body itself do. This is one more reason to keep [components pure](/learn/keeping-components-pure).
Returns the React host component for a DOM element, for example the `<button>` that React rendered. To find the component that rendered it, pass the returned `uid` to [`react_get_owner_stack`](#react_get_owner_stack).
*`element`: A DOM element in the page. Chrome DevTools MCP clients pass `{uid}`, using an element uid from the page snapshot, and Chrome DevTools MCP resolves it to the element.
`react_get_component_by_dom_element` returns an object with the same properties as [`react_get_component_by_uid`](#react_get_component_by_uid), without `hooks`. Its `type` is always `"host"`.
Returns where a component is mounted in the rendered tree, from its immediate parent up to the root. Parents can include host components and the root itself.
`react_get_parent_stack` returns an array of the component's parents, from its immediate parent up to the root. Each parent has a `uid`, a `name`, and a `type`, the same as in [`react_get_component_tree`](#react_get_component_tree). The array is empty for a root.
Returns the components that created this one through JSX, from its immediate owner up to the root owner.
454
-
455
-
<Note>
456
-
457
-
The **parent** of a component is where it's mounted in the tree. The **owner** is the component that created it in its JSX. For example, in `<Card><Avatar /></Card>` written inside `Profile`, `Avatar`'s parent is `Card` but its owner is `Profile`.
`react_get_owner_stack` returns an array of the component's owners, from its immediate owner up to the root owner. Each owner has a `uid`, a `name`, and a `type`, the same as in [`react_get_component_tree`](#react_get_component_tree). The array is empty for a root component and in production builds.
`react_get_owner_stack_trace` returns an object with one property:
480
-
481
-
*`stack`: A string in the same format as an [`Error` stack](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack). It's empty in production builds.
`react_get_component_source` returns an object with one property:
494
-
495
-
*`source`: An object with the component's `name`, `fileName`, `line`, and `column`. It's `null` for host components and in production builds. The location points at the code the browser loaded, so it may need source maps to map back to your files.
Starts recording render timing for every commit, like the Profiler tab in React DevTools. Stop recording with [`react_stop_profiling`](#react_stop_profiling).
0 commit comments