Back to Course
Printable Cheat Sheet
ToolMate Technical Interview Revision Deck • ReactUpdated 2026
React 19 & Architecture Interview Cheat Sheet
Fiber reconciler, hooks rules, concurrent rendering, state batching & performance optimizations.
Top Interview Golden Rules & Senior Principles
- Components must be pure functions regarding rendering: same props & state produce same JSX without side effects.
- React 18/19 batches all state updates automatically across timeouts, promises, and native event handlers.
- Never mutate state directly: always return new objects or arrays to trigger reconciliation by reference equality.
- useMemo / useCallback should optimize expensive computations or referential stability for memoized children, not every trivial variable.
- Keys must be stable, unique, and predictable (never use Math.random() or unstable array indices when items can reorder/delete).
Core Hooks Lifecycle & Mechanics
useEffect vs useLayoutEffect
useEffect(fn, deps) vs useLayoutEffect(fn, deps)
useEffect runs asynchronously after paint (non-blocking). useLayoutEffect runs synchronously after DOM mutation but before paint.
Gotcha: Use useLayoutEffect only to measure DOM or prevent visual flickering before paint.
useCallback & useMemo
useMemo(() => compute(a), [a])
useCallback caches function instances between renders; useMemo caches calculated return values.
useTransition (Concurrent Mode)
const [isPending, startTransition] = useTransition()
Marks non-urgent UI updates (like search filtering) as interruptible without freezing the input responsiveness.
Reconciliation & Fiber Architecture
Virtual DOM & Fiber Tree
WorkInProgress Tree vs Current Tree
Double-buffering model: React updates the workInProgress tree in chunks and commits to DOM in a single synchronous pass.
Diffing Algorithm Rules
O(n) Heuristic Diffing
Two elements of different types generate different trees. Keys differentiate items across re-renders.
ToolMate Interview Prep • https://interview.toolmate.co.in • Free for personal study & interview preparation