analyze_hook_deps
Identify missing or unnecessary React hook dependencies, async callbacks in useEffect, and missing cleanup functions to catch stale closure bugs.
Instructions
Analyze React hook dependencies in a file. Finds missing dependencies (bugs), unnecessary dependencies, async callbacks in useEffect, and cleanup functions. Essential for catching stale closure bugs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the TSX/JSX file to analyze | |
| hookTypes | No | Hook types to analyze (default: useEffect, useMemo, useCallback, etc.) | |
| componentName | No | Specific component to analyze (analyzes all if not provided) |