React guides
Every published React guide, newest first, with practical examples you can copy into your own project.
3,815 guides across 14 topics
Topics
Popular React guides
Most readReact Profiler API: Measuring Render Timings and Identifying Wasted Re-Renders
React with TypeScript: Generic Components, PropsWithChildren, and Event Types
React useTransition and useDeferredValue: Non-Blocking Concurrent UI Updates
React.lazy and Code Splitting: Route Chunks, Preloading, and Suspense
Latest React guides
Page 2 of 2React Keys and Reconciliation: How List Diffing Works and Index Key Bugs
React matches children by key, not by content. Why index keys shift state on insert, and how a key doubles as an intentional reset.
React Forms: Controlled vs Uncontrolled Inputs, useActionState, and Validation
State-driven inputs versus FormData, and the React 19 action APIs that make server validation round-trip without losing the user's input.
React Server Components vs Client Components: Serialization and Boundaries
use client marks a module graph, not a component. What runs where, what can cross the boundary, and how to keep interactive islands small.
React Error Boundaries and Suspense: Fallback UI and Async Recovery
Boundaries catch render errors, Suspense shows pending UI, and neither catches the other's case. How to compose them so a failed widget does not blank the page.
React Custom Hooks: Design Patterns, Rules of Hooks, and TypeScript Types
A custom hook shares logic, never state. The rules that keep hook order stable, plus debounce, localStorage and fetch hooks written correctly.
React useContext and useReducer: Scalable State Sharing Without Redux
Context transports state and useReducer names the transitions. Splitting the two contexts is what keeps dispatch-only components from re-rendering.
React useMemo vs useCallback: Memoization, React.memo, and When to Skip
Three tools for three different problems: a cached value, a stable function identity, a skipped subtree. How to tell which one the render cost needs.
React useRef: DOM Access, Mutable Values, and Ref Forwarding
A ref holds a value for the lifetime of the component without re-rendering. When to reach for the DOM, and how refs behave in React 19.
React useEffect: Dependency Arrays, Cleanup Functions, and Race Conditions
Effects synchronise with the outside world, and cleanup is what makes that safe. Dependency rules, abort controllers and the loops that follow from unstable deps.
React useState: Functional Updates, Automatic Batching, and Stale State
State is a snapshot, not a variable. Why three setCount calls add one, how React 18 batches after await, and how to update arrays and objects safely.