State Inspection
Tools for inspecting React component state hooks and tracking state changes over time.
inspect_state
Inspect React state hooks of a component found by selector. Works with useState, Zustand, and other hook-based state.
Parameters
Example
Tips
- The
selectortargets a React component in the Fiber tree — same syntax asquery_selector. - Hook
indexcorresponds to the order ofuseStatecalls in the component source code. - Works with
useState, Zustand stores, and other hook-based state management. - Use this to verify internal state without relying solely on visual output.
get_state_changes
List captured state changes over time. Shows previous and next values for each change.
Parameters
Example
Tips
- The buffer stores up to 300 state changes. Use
clear(target:state_changes) to reset. - Use
sinceto get only new changes since your last check. - Combine with
inspect_statefor a complete picture: current state + change history.
To clear the state change buffer, use the unified clear tool with target: "state_changes":
Call before a test scenario to get a clean history.