React hooks: the good, the bad and the ugly
summary
Covers practical tradeoffs: when hooks simplify code and when they create spaghetti state and tangled effects, with concrete patterns like custom hooks for reuse, useReducer for complex state, and useMemo/useCallback to avoid needless renders. Shows common bugs — stale closures and missing effect dependencies — and recommends using the ESLint hooks rules, isolating side effects, and keeping hooks small and pure. Demo refactors a class-based example into hooks and contrasts behavior and complexity.
AI-written summary · about
chapters (6)
- 0:00Introduction
- 1:11What are React Hooks
- 4:57Class components vs Hooks
- 8:58How to use Hooks effectively
- 12:54Performance benefits of Hooks
- 16:43Conclusion








