react-effects
Installation
SKILL.md
React Effects Guidelines
Primary reference: https://react.dev/learn/you-might-not-need-an-effect
Quick Decision Tree
Before adding useEffect, ask:
- Can I calculate this during render? → Derive it, don't store + sync
- Is this resetting state when a prop changes? → Use
keyprop instead - Is this triggered by a user event? → Put it in the event handler
- Am I syncing with an external system? → Effect is appropriate