Most of Your useEffects Shouldn't Exist
Unnecessary useEffects cause double-rendering, stale closures, and dependency-array bugs that waste debugging time. Recognizing that useEffect is an external-sync primitive — not a general-purpose state-change hook — eliminates a whole category of React performance and correctness problems.
A review of 37 useEffect hooks in a production React project revealed that 29 were redundant. The most common mistake is using useEffect to sync derived state — values that can be computed directly during rendering without an extra render cycle. Other frequent anti-patterns include routing event logic through useEffect instead of event handlers, hand-rolling data fetching instead of using React Query or SWR, and treating useEffect as a one-time initializer that breaks under React Strict Mode.
Each anti-pattern adds unnecessary renders, extra state variables, and dependency arrays that become bug vectors. The fix is usually shorter code: a derived constant replaces a state-plus-effect pair, an event handler absorbs logic that was artificially split across two locations, and a dedicated data-fetching library collapses 20 lines of manual fetch, cancel, loading, and error management into three.
The only legitimate use case for useEffect is synchronizing React with external systems — DOM observers, WebSocket connections, third-party chart libraries. If a useEffect body calls only React APIs like setState, it is almost certainly wrong.
The 80% redundancy rate found in the audit suggests that useEffect overuse is not a beginner mistake but a systemic pattern in how React developers are taught to think about state changes.
Treating useEffect as a general 'when X changes, do Y' mechanism conflates two distinct concerns — deriving values and synchronizing with external systems — that React already handles through separate, simpler mechanisms.
The quick-reference table effectively reframes useEffect from a Swiss Army knife into a specialized tool, which is a mental model shift that most React documentation fails to make explicit.