Custom Hooks: Extracting Reusable Logic
How to build and name custom hooks, and what makes them testable and reusable.
Practice
Search by concept, narrow to a roadmap, or pick a tag to focus on the exact topic you want to rehearse.
20 articles · page 2 of 3
How to build and name custom hooks, and what makes them testable and reusable.
Context basics, performance implications, and alternatives like composition.
How to think about form inputs, refs, and when each approach makes sense.
How React batches state updates and what it means for setState and derived state.
Compare useMemo and useCallback with a working React example, dependency rules, common mistakes, and a render-tracing interview exercise.
When effects run, how dependency arrays work, reference stability traps, and avoiding stale closures.
How keys help React preserve identity and avoid subtle UI bugs.
Core building blocks: props vs state, one-way data flow, and when to lift state up.
How React thinks about rendering, reconciliation, and why state changes cause re-renders.