Quick revision

Interview & Cheat Sheet

Version tables, old vs new APIs, hook use-cases, and interview-level questions covering React 16 through 19.3. · 5 lessons · click a card to expand

Part of the React 16 → 19.3 evolution reference. Expand a card, then use chapter links in the sidebar.

If you can fill the tables from memory and answer the questions out loud, you are at interview level for this era.

Version tables

3 items
01Version → feature cheat sheetReact 16
Introduced in: the Version column. This is the flashcard.
FeatureVersionProblem solvedRelated / replacement
Fiber16.0Interruptible reconcilerStack reconciler
Error Boundaries16.0Render errors unmount everythingClass getDerivedStateFromError (16.6)
Portals16.0Modals trapped in overflowcreatePortal
Fragments <>16.2Extra DOM wrappersReact.Fragment + key
New Context / createRef / forwardRef / StrictMode16.3Legacy context, string refsuseContext 16.8
Pointer Events16.4Mouse vs touch splitonPointerDown
Profiler16.5Measure render costDevTools
memo, lazy, Suspense (code split)16.6PureComponent + splittingData Suspense later
Hooks16.8Reuse stateful logicClasses still exist
UNSAFE_ names, act()16.9Concurrent-unsafe lifecyclesEffects
JSX transform backport16.14React in scope17 automatic runtime
Root event delegation, gradual upgrade17.0Nested Reacts, JSXNo new UI API
createRoot, concurrent, batching18.0Jank, partial batchingReactDOM.render legacy
useTransition, useDeferredValue, useId, useSyncExternalStore, useInsertionEffect18.0Priority, hydration ids, tearing, CSS-in-JS—
Streaming SSR, hydrateRoot18.0Slow TTFBrenderToString
Actions, useActionState, useFormStatus, useOptimistic, use()19.0Async UI boilerplateManual pending state
Ref as prop, Context as provider19.0forwardRef / .Provider noiseStill supported
Document metadata / preload19.0Helmet / useEffect titleNext metadata [framework]
Owner Stack, useId «r»19.1Debug / CSS-invalid idscaptureOwnerStack dev
Activity, useEffectEvent, Performance Tracks19.2Hidden state, stale effects, profilingcacheSignal [RSC]
ViewTransition, Fragment refs, browser()19.3Animation, group DOM, client-onlyWere experimental before 19.3
Tip: Hooks = 16.8, not 16.7. Concurrent public API = 18, not 17. ViewTransition stable = 19.3, not 19.0.
Try it: Cover the Version column and recite it.
02Hook → use caseReact 16.8
Introduced in: each hook’s version. Pick the hook from the job, not from habit.
HookUse whenDo not use when
useStateLocal, simple stateComplex interdependent transitions → reducer
useReducerMany next-states, or pass dispatch downOne boolean
useEffectSync with external systemsTransforming data for render (useMemo / plain)
useLayoutEffectMeasure/write DOM before paintFetching
useContextTree-wide, rare updatesHigh-frequency mouse state
useMemoExpensive derive, provenEvery variable “just in case”
useCallbackStable fn for memoized childrenEvery handler
useRefMutable box / DOM“Latest state” forever — consider 19.2 useEffectEvent
useImperativeHandleTiny child API on a refPassing data up
useTransitionHeavy view, keep input instantThe input’s own value
useDeferredValueOne value, expensive childCheap lists
useIda11y ids + SSRList keys
useSyncExternalStoreExternal storesReact state
useInsertionEffectCSS-in-JS librariesApp code
useActionStateForm Action + last resultRead-only UI
useFormStatusSubmit button in a childOutside <form>
useOptimisticPredictable mutation UIPayments / irreversible
useUnwrap existing Promise / conditional contextuse(fetch()) each render
useEffectEventLatest props inside a subscriptionClick handlers as a style
Try it: For “chat socket + current theme,” name useEffect + useEffectEvent.
03Feature → real-world scenarioReact 18
Introduced in: various. Interviewers ask “when would you use X.”
ScenarioFeature
Chart widget throwsError Boundary
Modal clippedPortal
<tr> childrenFragment (or 19.3 fragment ref)
800-row grid keystroke jankuseDeferredValue / useTransition
SSR label mismatchuseId
Zustand/Redux + concurrentuseSyncExternalStore (inside the lib)
Save profile formForm Action + useActionState
Like buttonuseOptimistic
RSC child needs useruse() on a promise or Context
Settings tabs keep draftsActivity (19.2)
Product image morph to PDPViewTransition (19.3)
Client-only chart, no snapshotbrowser() (19.3) or framework ssr: false
Try it: Invent a fourth scenario for Activity that is not tabs.

Interview questions

2 items
04Questions you should be able to answerReact 16
Introduced in: n/a — this is revision. Speak in version + problem + API.

Architecture

  • What is reconciliation? (diff type+key, then commit)
  • What is a Fiber? (unit of work, linked list, React 16)
  • Render vs commit? (pure calculate vs DOM/effects)
  • What does concurrent rendering mean? (interruptible render, 18, createRoot)
  • Urgent vs transition?

Version traps

  • When did Hooks ship? (16.8)
  • What did React 17 add? (upgrade path, JSX transform, event root)
  • Is Concurrent Mode a wrapper in 18? (No — createRoot + features)
  • Is Suspense for data in 16.6? (No — lazy only)
  • Stable ViewTransition version? (19.3)

Hooks / 18 / 19

  • Why not put useId in key?
  • Why useSyncExternalStore vs useEffect subscribe?
  • Why useFormStatus in a child of form?
  • use() rules vs useContext?
  • Action vs useEffect fetch?
  • RSC vs SSR vs Server Functions vs Compiler?

Sample concise answers

“What changed in React 18?” Public concurrent rendering: createRoot, automatic batching, Transitions, streaming SSR, Strict Mode remount in dev.

“What is an Action in React 19?” An async function run as a transition (including form action), so pending/error/optimistic have a standard model. Server Functions are the same idea compiled to HTTP by a framework.

“Why Fiber?” So React can pause, resume, recover from errors, and later schedule work. Stack reconciler could not yield.

Tip: If you do not know, say stable vs experimental vs framework instead of guessing a version.
Try it: Record a 90-second answer to “Walk me through React 16 to 19.” Use Evolution as the outline.
05Old vs new one-linersReact 19
Introduced in: Replacement column’s version.
OldNew
ReactDOM.rendercreateRoot (18)
ReactDOM.hydratehydrateRoot (18)
componentWillMountuseEffect / constructor
String refsuseRef
Legacy contextcreateContext
findDOMNoderefs / FragmentInstance 19.3
Function defaultPropsdefault parameters (19)
forwardRef requiredref prop (19)
<C.Provider> only<C> (19)
Manual pending + errorActions + useActionState (19)
themeRef.current in effectsuseEffectEvent (19.2)
Unmount tabs to resetKeep with Activity or unmount on purpose (19.2)
react-transition-group for route morphViewTransition (19.3)
useFormStateuseActionState
Try it: Write the left column from memory, then the right.