react-useeffect
Installation
SKILL.md
React useEffect Best Practices
Effects are escape hatches - they should primarily synchronize with external systems. Many common use cases don't actually require Effects.
Key Recommendations
Avoid Effects for:
- Computing derived values (calculate during render instead)
- Handling user interactions (use event handlers)
- Managing state chains (compute state in handlers)
- Responding to prop changes (use the
keyprop)
Use Effects for:
- Synchronizing with external systems (non-React widgets, browser APIs)
- Subscriptions and analytics
- Data fetching with proper cleanup