trace_state_updates
Find every location that updates a state variable, including setter calls, trigger events, and async/conditional details. Map state flow without reading entire files.
Instructions
Find all locations that update a state variable. Returns setter calls with context (handler, useEffect, inline), trigger events, and whether updates are async/conditional. Helps understand state flow without reading entire files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max updates to return (default: 20, max: 50) | |
| filePath | Yes | File containing the state | |
| stateName | Yes | State variable name (e.g., "count", "user", "isLoading") | |
| projectPath | Yes | Root path of the project | |
| componentName | No | Specific component to analyze |