Virtual DOM state render() element tree diff vs previous DOM patch minimal A lightweight tree of elements describing what the UI should look like, compared against the previous tree to compute the DOM changes.
in practice JSX compiles to createElement calls producing it; the reason React can batch and schedule DOM writes.
Fiber App fiber Header List Item Item child / sibling / return pointers React's internal unit of work: one node per component instance with links to child, sibling and return, so rendering can pause and resume.
in practice The React DevTools component tree; why rendering can be interrupted in concurrent mode.
Reconciliation same type, same key update props keep state different type or key unmount old mount new state lost Comparing the new element tree with the current fiber tree to decide what to create, update, move or delete.
in practice Keys deciding identity in lists; changing a component type remounting its whole subtree.
Keys key={item.id} moves keep their state key={index} reorder = wrong state key={Math.random()} remount every render Stable identities for list children so reconciliation can match items across renders instead of by position.
in practice Index keys scrambling input state when a list is reordered; key to reset a component on purpose.
Render phase vs commit phase render pure, inter… commit DOM writes,… layout e… before paint effects after paint Render computes what changed and can be interrupted or repeated; commit applies changes to the DOM and runs layout effects synchronously.
in practice Why render must be pure (it may run twice in StrictMode); why useLayoutEffect blocks paint.
Lanes SyncLane discrete input InputContinuousLane drag, scroll DefaultLane fetch result TransitionLanes startTransition IdleLane offscreen React's bitmask priorities for updates (sync, input, default, transition, idle), letting urgent updates interrupt less urgent ones.
in practice startTransition marking an update as interruptible; input staying responsive during a heavy list filter.
Concurrent rendering render (transit… input! render (resume) commit 51 ms Rendering that can be paused, resumed or thrown away, so React can keep the UI responsive and prepare new screens in the background.
in practice useTransition, useDeferredValue, Suspense with transitions.
Batching setA() setB() setC() one rend… Grouping several state updates into one render; automatic in React 18+ for updates in the same tick, including in promises and timeouts.
in practice Three setState calls in a handler causing one render, not three.
Suspense while pending <Spinner /> fallback shown when ready <Comments /> content revealed A boundary that shows a fallback while something inside is not ready (code, data), then reveals the content.
in practice Route-level loading states; streaming SSR sending each boundary as it resolves.
Server Components Server Component runs on server no JS shipped reads DB directly Client Component "use client" ships JS state, effects, events Components that run only on the server, send serialised output (not code) to the client, and can read data directly.
in practice Next.js App Router; "use client" boundaries; smaller bundles for read-only UI.
React Compiler component co… compiler analyse memoised out… auto cache A build-time compiler that memoises components and values automatically based on its analysis of the code.
in practice Removing hand-written useMemo and useCallback; requires code to follow the rules of React.
StrictMode mount unmount (dev) cleanup mount again did it hold? A development wrapper that double-invokes render and effects to surface impure renders and missing cleanups.
in practice Effects firing twice in dev; a hint that cleanup is missing, not a bug in React.