What problem does it solve?
Helps developers recognize when useEffect is misused in React components and provides clear alternatives to avoid double renders, stale state, fragile flags, and other synchronization bugs.
Core Features & Use Cases
- Decision Tree Guidance: Walks through whether an external subscription truly requires an effect or if render-time logic, event handlers, or remounts are better.
- Concrete Anti-Patterns & Fixes: Shows common mistakes like derived state in effects, state-reset effects, waterfall updates, and flag-based fetches, and demonstrates safer patterns.
- Modern Alternatives: Recommends alternatives including render-time calculations, key-based remounts, event-driven handlers, useSyncExternalStore for subscriptions, and React 19's use API for data reading.
- Use Case: Use during code reviews or performance debugging to replace effect-driven state with deterministic render-time logic and safer subscription hooks.
Quick Start
Use the react-useeffect-avoid skill to analyze a React component and list where useEffect can be removed and which specific alternative should be used instead.