| name | you-might-not-need-an-effect |
|---|---|
| description | Consult this skill whenever writing, editing, or reviewing React code that involves (or might involve) useEffect. Trigger on any React component work where you're tempted to reach for useEffect — including syncing state to other state, transforming data for rendering, responding to events, resetting state on prop changes, chaining state updates, initializing the app, notifying parent components, data fetching, or any "I want X to happen when Y changes" instinct. Also trigger when reviewing existing code that already uses useEffect. Treat useEffect as effectively banned — almost every use is a code smell with a simpler, more correct alternative, and every "just in case" Effect is the seed of the next race condition or infinite loop. Based on the React docs "You Might Not Need an Effect" and Alvin Sng's "Why we banned React's useEffect". |
Treat useEffect as effectively banned. Not literally forbidden — there are a hand