Hooked on React Hooks
summary
Covers concrete React hook rules and patterns: never conditionally call a hook, how useState’s setter can take a function to avoid stale state, when to switch to useReducer (state that depends on other state or many user interactions), useRef doesn't trigger rerender and is good for DOM access, useEffect needs dependency array and its cleanup/async caveats, when to use useLayoutEffect, and using profiler before adding useMemo/useCallback for costly computations. Good if needing practical how-to details.
AI-written summary · about
chapters (20)
- 0:00Introduction to hooks
- 2:20What are React hooks
- 3:23Rules of using hooks
- 4:24Understanding useState
- 6:32useState advanced features
- 6:53When to use useReducer
- 7:57useReducer in practice
- 10:03Understanding useContext
- 11:26When to use useContext
- 12:29useContext implementation
- 14:57Differences useRef vs useState
- 15:59When to use useRef
- 17:47Purpose of useEffect
- 18:30useEffect dependency array
- 19:54useEffect cleanup function
- 20:59Common useEffect mistakes
- 22:02useLayoutEffect explained
- 23:06useMemo and useCallback
- 24:53Optimizing with useMemo
- 26:37Performance considerations








