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 1 of 2React with TypeScript: Generic Components, PropsWithChildren, and Event Types
Generic props that infer from data, PropsWithChildren instead of React.FC, and element-scoped event types that keep currentTarget typed.
React Profiler API: Measuring Render Timings and Identifying Wasted Re-Renders
actualDuration versus baseDuration, phase names that tell you who triggered a commit, and how to ship the numbers without flooding a backend.
React useImperativeHandle: Exposing Custom Ref APIs Without Breaking Encapsulation
A ref gate that exposes three methods instead of the whole DOM node, with the React 19 ref-prop form and the dependency rules that keep it fresh.
React.lazy and Code Splitting: Route Chunks, Preloading, and Suspense
Where the split points belong, how to preload on intent, and how to recover when a stale chunk 404s after a deployment.
React StrictMode: Why Components Render Twice and Impure Side-Effect Detection
Double render, double Effect setup and double reducer calls are diagnostics, not bugs. What each one detects and how to fix the code it catches.
React useId and useSyncExternalStore: SSR-Safe Hydration and External Stores
Generated ids that match on both sides of hydration, and external store reads that never tear and never loop.
React useOptimistic and useFormStatus: Instant UI Feedback in React 19
Optimistic state that reverts by itself when the Action fails, plus form pending status read from inside the form instead of lifted state.
React useTransition and useDeferredValue: Non-Blocking Concurrent UI Updates
Transitions let React throw away background work when typing arrives. Which hook defers what, and why a controlled input must never be transitioned.
React useLayoutEffect vs useEffect: Synchronous DOM Measurements and Flicker Fixes
One hook runs before the browser paints and one after. Measuring layout in the wrong one costs a visible frame of flicker on every mount.
React Portals: createPortal for Modals, Tooltips, and Event Bubbling
Why portal content still bubbles events through the React tree, and how to move a modal out of a clipping container without losing context or focus.