All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,965 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 24 of 397React 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.
React 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.