Breaking the useEffect Habit
summary
Argues that most useEffect calls are unnecessary and should be reserved for syncing things outside React, cites a Facebook audit finding 30% of effects were wrong or redundant, and shows concrete replacements: using useMemo for cached calculations, using keys to remount to reset component state, moving network work to TanStack or into event handlers, and pulling logic into plain variables or functions. Examples rerun less, reduce renders, and simplify code in live demos.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:55What is useEffect?
- 6:49Why avoid useEffect?
- 10:20When to use useEffect
- 11:03Updating state with useEffect
- 13:58Caching calculations
- 16:23Resetting state
- 20:40Sharing event logic
- 21:44Sending post requests
- 22:26Chaining useEffects
- 23:29Summary and takeaways








