no-use-effect
Installation
SKILL.md
Avoid Unnecessary useEffect
Prefer render-time derivation, event handlers, the existing query layer, and
component identity over effect choreography. Use React useEffect directly
when a component must synchronize with a system outside React.
Decision Table
| Need | Prefer |
|---|---|
| Derive a value from props or state | Compute during render |
| Perform work caused by a user action | Run it in the event handler |
| Read or mutate server data | Use the existing generated API/query layer |
| Reset a subtree for a different entity | Give the subtree a different key |
| Subscribe to or control an external system | Use useEffect with cleanup and complete dependencies |