Pages

Topics

Tools

↑↓navigate↵openescclose

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

Latest guides

3D illustration of deterministic SSR hydration id trees synced with tear-free external store snapshots
React

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.

ReactSSRHooks
3D illustration of optimistic UI state cards with pending form indicators reconciling against async server responses
React

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.

ReactReact 19Hooks
3D illustration of urgent typing input lanes prioritized ahead of interruptible background transition renders
React

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.

ReactConcurrencyPerformance
3D illustration of a browser paint timeline with a synchronous layout measurement step running before the frame is presented
React

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.

ReactHooksRendering
3D illustration of a modal DOM node portalled outside its parent container while React events still bubble through the component tree
React

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.

ReactDOMPortals
3D illustration of Fiber virtual DOM nodes matched by stable keys while a list is reordered
React

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.

ReactRenderingPerformance
3D illustration of controlled state-driven inputs contrasted with FormData streams feeding form actions
React

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.

ReactFormsReact 19
3D illustration of server-rendered RSC payloads streaming across a use client hydration boundary
React

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.

ReactServer ComponentsArchitecture
3D illustration of Suspense loading shields and ErrorBoundary isolation cages around subtrees
React

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.

ReactError HandlingSuspense
3D illustration of reusable custom hook capsules plugging stateful logic into several UI components
React

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.

ReactHooksTypeScript