06 · Frameworks & State
React
Hooks, reconciliation, performance — the framework interviews center on.
The framework most FAANG frontend loops assume. They'll ask how it works, not just how to use it.
⭐ Flagship: Build a Virtualized List
Fundamentals & rendering
| Topic | Difficulty | Time | Tags | Best Resources |
|---|---|---|---|---|
JSX & createElement |
🟢 | 30m | #basics |
react.dev: JSX ⭐ |
| Components, props, composition | 🟢 | 45m | #basics |
react.dev: components ⭐ |
| Rendering & re-render mental model | 🟡 | 1h | #rendering |
react.dev: render & commit ⭐ |
| Reconciliation & keys | 🟡 | 45m | #rendering #internals |
react.dev: preserving state ⭐ |
| Fiber architecture | 🔴 | 1.5h | #internals |
Lin Clark: cartoon intro to Fiber ⭐ |
| Controlled vs uncontrolled inputs | 🟡 | 45m | #forms |
react.dev: forms ⭐ |
| Lists, keys & reconciliation pitfalls | 🟡 | 45m | #rendering |
react.dev: rendering lists ⭐ |
Hooks
| Topic | Difficulty | Time | Tags | Best Resources |
|---|---|---|---|---|
| Rules of hooks | 🟢 | 30m | #hooks |
react.dev: rules ⭐ |
useState & batching |
🟢 | 45m | #hooks #state |
react.dev: useState ⭐ |
useEffect & effect timing |
🟡 | 1h | #hooks |
react.dev: you might not need an effect ⭐ |
useLayoutEffect vs useEffect |
🟡 | 30m | #hooks |
react.dev: useLayoutEffect ⭐ |
useMemo / useCallback |
🟡 | 45m | #hooks #performance |
react.dev: useMemo ⭐ |
useRef & imperative handles |
🟡 | 45m | #hooks |
react.dev: useRef ⭐ |
useContext & context perf |
🟡 | 1h | #hooks #state |
react.dev: useContext ⭐ |
useReducer & state machines |
🟡 | 45m | #hooks #state |
react.dev: useReducer ⭐ |
useTransition / useDeferredValue |
🔴 | 1h | #concurrent |
react.dev: useTransition ⭐ |
useSyncExternalStore |
🔴 | 45m | #hooks #state |
react.dev ⭐ |
useId, useImperativeHandle |
🟡 | 30m | #hooks |
react.dev: useId ⭐ |
| Custom hooks | 🟡 | 45m | #hooks #patterns |
react.dev: reusing logic ⭐ |
Performance & patterns
| Topic | Difficulty | Time | Tags | Best Resources |
|---|---|---|---|---|
React.memo & referential equality |
🟡 | 45m | #performance |
react.dev: memo ⭐ |
Code splitting & lazy/Suspense |
🟡 | 45m | #performance #bundling |
react.dev: lazy ⭐ |
| Virtualization / windowing | 🔴 | 1.5h | #performance #large-data |
Flagship ⭐ |
| Avoiding unnecessary re-renders | 🔴 | 1h | #performance |
react.dev ⭐ |
| Error boundaries | 🟡 | 30m | #errors |
react.dev ⭐ |
| Portals | 🟢 | 30m | #patterns |
react.dev: createPortal ⭐ |
Refs & forwardRef |
🟡 | 30m | #patterns |
react.dev: forwardRef ⭐ |
| Compound components / render props | 🔴 | 45m | #patterns |
patterns.dev: React patterns ⭐ |
| HOCs | 🟡 | 30m | #patterns |
patterns.dev ⭐ |
| React Compiler | 🟡 | 45m | #performance #modern |
react.dev: compiler ⭐ |
Rendering strategies & advanced
| Topic | Difficulty | Time | Tags | Best Resources |
|---|---|---|---|---|
| Concurrent rendering | 🔴 | 1h | #concurrent |
react.dev ⭐ |
| Suspense & streaming | 🔴 | 1h | #concurrent #data |
react.dev: Suspense ⭐ |
| React Server Components (RSC) | 🔴 | 1.5h | #rsc #rendering |
react.dev: server components ⭐ |
| SSR & hydration | 🔴 | 1h | #ssr |
react.dev: hydrateRoot ⭐ |
| Server Actions | 🟡 | 45m | #rsc #data |
react.dev: 'use server' ⭐ |
| Testing React | 🟡 | 1h | #testing |
Testing Library ⭐ |
❓ Rapid-fire React interview questions
The most-asked React interview questions. Say your answer, then verify against the resources above.
- What is the virtual DOM and how does reconciliation work?
- Why are keys important in lists? What happens if you use the index?
useEffectvsuseLayoutEffect— what's the difference?- When does a component re-render?
- What does
React.memodo?useMemovsuseCallback? - What are the rules of hooks and why do they exist?
- Controlled vs uncontrolled components?
- What is
useRefused for (vs state)? - How does Context work, and what are its performance pitfalls?
useReducervsuseState— when to use each?- What are error boundaries?
- How do code splitting,
lazy, andSuspensework? - What is React Fiber?
- What are React Server Components (RSC)?
- CSR vs SSR vs SSG vs ISR — trade-offs?
- What is hydration and what causes hydration mismatches?
- How do you avoid unnecessary re-renders?
- What is a custom hook?
- What is prop drilling and how do you avoid it?
- Difference between state and props?
- What is
useTransition/ concurrent rendering? - How do portals work and when do you need them?
- How does state batching work in React 18?
- What is the difference between
useEffectcleanup and unmount? - What are compound components and render props?
⚛️ Advanced & scenario questions
The "how would you actually build/fix this" questions senior React interviews lean on.
- A component re-renders too often — how do you diagnose and fix it?
- Why does my
useEffectrun twice in development (StrictMode)? - What is a stale closure in
useEffectand how do you fix it? - How do you fetch data in React and avoid race conditions?
- How do you build a debounced search input?
- When do
useMemo/useCallbackactually help — and when do they hurt? - How do you share state across the tree without prop drilling?
- How would you build an infinite scroll / virtualized list? → flagship
- How do you persist state to localStorage with a custom hook?
- How does changing a
keyreset a component's state? Give an example. - How do you prevent a memory leak from a subscription/timer in a component?
- How do you code-split a route or heavy component?
- Controlled vs uncontrolled form — build both.
- How do you test a component with React Testing Library?
- How do you implement a global store without Redux (Context/Zustand/
useSyncExternalStore)? - How do you handle error states and error boundaries in a data-fetching UI?
- What's the difference between
useEffectanduseLayoutEffectin practice? - How do you optimize a list of thousands of rows?
- How would you implement optimistic updates for a like button?
- How do you avoid prop drilling vs when is it actually fine?
Related: 13-state-management · 07-nextjs · 09-performance · 19-build-your-own
Missing something? Add a row.