React interview mastery — fundamentals to senior
React interviews become easier when answers are built from mental models rather than memorized trivia.
Strong answer shape
Give the direct answer first, then deepen only as the interviewer asks.
Junior foundations
A junior-quality answer should be accurate and concrete. A stronger answer already distinguishes React elements from DOM nodes and explains that keys participate in identity, not only warning suppression.
Controlled vs uncontrolled inputs
Neither model is universally better; choose based on workflow, validation, server/form integration, and ownership needs.
Mid-level mental models
Common render triggers include local state, ancestor evaluation, consumed Context changes, and external-store snapshots. Rendering does not imply a DOM mutation.
State is a snapshot
setCount(count + 1);
setCount(count + 1);
Both calls can use the same captured snapshot. When updates depend on queued previous state:
setCount(c => c + 1);
setCount(c => c + 1);
Effects, refs, Context, reducers
Context distributes a value; it does not automatically provide persistence, selectors, request caching, normalization, or fine-grained subscriptions.
Senior identity and reconciliation
Reconciliation compares the previous React tree with the next description to determine what can be preserved, updated, mounted, or removed. Avoid claiming React performs a generic optimal tree diff.
Concurrency
Render purity matters because not every evaluation commits.
Transition vs deferred value
Neither replaces request debounce/cancellation, caching, workers, or algorithmic optimization.
Suspense and Error Boundaries
Server Components vs SSR
They can be used together, but they solve different problems.
Senior answer pressure test
A senior interview answer is not longer for its own sake. It reveals a reliable model, scopes the claim, and shows how the choice behaves in production.