useeffect-audit
Installation
SKILL.md
useEffect Audit
Overview
Run a structured review of every useEffect and useLayoutEffect in scope. For each one, decide whether to:
- keep it as an external synchronization process,
- move logic to an event handler,
- derive during render, or
- split/extract logic (including
useEffectEventwhere appropriate).
Apply the smallest behavior-preserving refactor that removes unnecessary Effects and fixes dependency/lifecycle bugs.
Primary references:
- https://react.dev/learn/synchronizing-with-effects
- https://react.dev/learn/lifecycle-of-reactive-effects
- https://react.dev/learn/separating-events-from-effects
- https://react.dev/learn/removing-effect-dependencies
- https://react.dev/reference/react/useEffectEvent
- https://react.dev/learn/you-might-not-need-an-effect