find_spurious_renders
Identify React components that re-rendered unnecessarily due to unstable references, with per-component render counts and wasted time, to target React.memo for optimization.
Instructions
Finds React components that re-rendered without any meaningful prop, state, context, or hook changes. These are wasted renders caused by unstable references (inline objects/functions/arrays) passed from a parent. Returns component name, total render count, spurious count, and wasted milliseconds. Use to identify the highest-ROI targets for React.memo.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"profile_path": "<profile_path>"
},
"name": "find_spurious_renders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile_path | Yes | Absolute path to the React DevTools Profiler export (.json) | |
| min_render_count | No | Only include components with at least this many total renders (default: 1) |