Rehearse

Every interview question in the guide. Answer out loud first, then open the model answer and grade yourself honestly. Shaky and missed questions come back first in flashcard mode.

0 got · 0 to review · 371 total
371 questions
1. The DOM and the sync problem

What problem does React solve, in one sentence?

basic
1. The DOM and the sync problem

What's the difference between imperative and declarative UI code?

basic
1. The DOM and the sync problem

Why does it matter that the DOM is stateful?

intermediate
1. The DOM and the sync problem

Is hand-written DOM code ever the better choice over a declarative framework?

intermediate
2. UI as a function of state

What does "UI is a function of state" mean?

basic
2. UI as a function of state

Why not re-render the whole page with innerHTML whenever state changes?

basic
2. UI as a function of state

Why does it matter that the view function is pure?

intermediate
2. UI as a function of state

In a redraw-everything renderer, why attach event listeners to the root instead of each element?

intermediate
2. UI as a function of state

What would a renderer need in order to keep view(state) but stop losing DOM state?

senior
3. Elements and JSX

What does JSX compile to?

basic
3. Elements and JSX

What is a React element, and how is it different from a component?

basic
3. Elements and JSX

Why do React elements have a $$typeof property?

intermediate
3. Elements and JSX

Why must component names start with a capital letter?

basic
3. Elements and JSX

Why does a component have to return a single root, and what does a Fragment do?

intermediate
3. Elements and JSX

What changed with the automatic JSX runtime, and why?

senior
4. Rendering elements

How does a renderer treat a component differently from a DOM element like div?

basic
4. Rendering elements

What does createRoot(container).render(<App />) do, and is it synchronous?

basic
4. Rendering elements

Why are props read-only?

basic
4. Rendering elements

If you re-render by building the DOM from scratch each time, what goes wrong?

intermediate
4. Rendering elements

A component passes a new arrow function as onClick on every render. Does the renderer remove and re-add a DOM listener each time?

intermediate
5. The virtual DOM and diffing

How does React's reconciliation (diffing) algorithm work?

intermediate
5. The virtual DOM and diffing

Is the virtual DOM faster than the real DOM?

intermediate
5. The virtual DOM and diffing

What happens to a component's state if its parent element changes from a div to a section?

intermediate
5. The virtual DOM and diffing

Why shouldn't you define a component inside another component?

basic
5. The virtual DOM and diffing

Does a component re-rendering mean the DOM was updated?

basic
5. The virtual DOM and diffing

Does React compute a list of patches when it diffs?

senior
6. Keys

Why does React need keys in lists?

basic
6. Keys

What's wrong with using the array index as a key?

basic
6. Keys

How can keys be used outside of lists?

intermediate
6. Keys

How does React decide which keyed children to move?

senior
6. Keys

What happens if you generate keys with Math.random() during render?

basic
7. Fiber

What is React Fiber and what problem does it solve?

intermediate
7. Fiber

What's the difference between the render phase and the commit phase?

basic
7. Fiber

Why must components be pure during rendering?

intermediate
7. Fiber

What are the current and work-in-progress trees?

senior
7. Fiber

Does React time-slice every render in React 18 and 19?

senior
7. Fiber

How does React decide when to yield to the browser?

senior
8. Hooks from scratch

Where does useState store its state?

intermediate
8. Hooks from scratch

Why do the rules of hooks exist?

basic
8. Hooks from scratch

Is setState synchronous? Why does console.log after setState print the old value?

basic
8. Hooks from scratch

A component deep in the tree calls its state setter. How does that update reach the screen?

intermediate
8. Hooks from scratch

What happens when you call setState with the same value?

intermediate
8. Hooks from scratch

Why is the setter from useState stable across renders, and why does it matter?

senior
9. Effects from scratch

When does a useEffect callback run?

basic
9. Effects from scratch

How does the dependency array work?

basic
9. Effects from scratch

In what order do cleanups and effects run when dependencies change?

intermediate
9. Effects from scratch

useEffect doesn't run anything when you call it. So where does the effect go, and how does React find it after the commit?

senior
9. Effects from scratch

Why are effects flushed in a separate task after the commit instead of right after the DOM is updated?

intermediate
9. Effects from scratch

If you've built a toy React, what are the main things real React adds?

senior
10. Components and props

What's the difference between props and state?

basic
10. Components and props

Is mutating something during render always a bug? Where exactly is the line, and how does StrictMode help you find it?

intermediate
10. Components and props

How do you use composition in React, and why is it preferred over inheritance?

intermediate
10. Components and props

A list item component needs its book's id. Why can't it read props.key?

basic
10. Components and props

What changed for custom elements in React 19?

senior
10. Components and props

Why does {count && <Badge />} sometimes render a 0?

basic
11. Events

What is a SyntheticEvent?

basic
11. Events

Walk me through what happens when a user clicks a button with an onClick in React.

intermediate
11. Events

Why did React 17 move event delegation from document to the root container?

senior
11. Events

What was event pooling, and what happened to it?

intermediate
11. Events

What happens when you mix native addEventListener calls with React handlers?

senior
12. State

A handler calls setCount(count + 1) three times. What happens, and why?

basic
12. State

What is automatic batching, and what changed in React 18?

intermediate
12. State

What's a stale closure in React, and how do you avoid one?

intermediate
12. State

Why must state be updated immutably in React?

intermediate
12. State

How do you decide what belongs in state?

senior
12. State

What decides whether a component's state is preserved or reset across renders?

senior
13. useReducer

What is a reducer, and how does useReducer work?

basic
13. useReducer

When do you choose useReducer over useState?

intermediate
13. useReducer

What can't you do inside a reducer, and where does that work go instead?

intermediate
13. useReducer

How should you design actions?

senior
13. useReducer

How does Immer help with reducers, and what does it cost?

senior
14. Refs

What's the difference between useRef and useState?

basic
14. Refs

When does React set a DOM ref, and why can't you read it during render?

intermediate
14. Refs

How did React 19 change passing refs to components?

intermediate
14. Refs

What's a ref callback, and what changed about them in React 19?

senior
14. Refs

When would you use useImperativeHandle?

intermediate
14. Refs

What are Fragment refs in React 19.3, and what problem do they solve?

senior
15. Effects

What is useEffect for, and how should you think about it?

basic
15. Effects

Why does my effect run twice in development?

intermediate
15. Effects

What's the race condition when fetching in an effect, and how do you fix it?

intermediate
15. Effects

How do dependencies work, and what goes wrong if you leave one out?

intermediate
15. Effects

How do you decide between an event handler and an effect?

senior
15. Effects

Give examples of effects you'd remove in code review.

senior
15. Effects

What's the difference between useEffect, useLayoutEffect and useInsertionEffect?

senior
15. Effects

What problem does useEffectEvent solve?

senior
15. Effects

A parent and its child both have effects. In what order do they run, on mount and on update?

intermediate
16. Context

What problem does context solve, and how do you use it in React 19?

basic
16. Context

What re-renders when a context value changes?

intermediate
16. Context

How do you keep a context from causing unnecessary re-renders?

senior
16. Context

What happens if a provider passes value={{ user, setUser }}?

intermediate
16. Context

When would you not use context for state?

senior
16. Context

How is use(Context) different from useContext(Context)?

basic
17. Custom hooks

If two components call the same custom hook, do they share state?

basic
17. Custom hooks

Why do custom hooks have to start with use? What happens if you break the convention?

intermediate
17. Custom hooks

Why does useId exist? Why not Math.random() or a global counter?

intermediate
17. Custom hooks

Why use useSyncExternalStore instead of useState plus a subscribing useEffect?

senior
17. Custom hooks

What happens when getSnapshot returns a new object every time it's called?

senior
17. Custom hooks

What makes a custom hook well designed?

senior
18. Component patterns

What are compound components and how do you implement them?

intermediate
18. Component patterns

How do you design a component that can be both controlled and uncontrolled?

intermediate
18. Component patterns

Why did hooks replace higher-order components for most uses? When would you still write a HOC?

senior
18. Component patterns

Are render props still relevant?

intermediate
18. Component patterns

What is a headless component, and why have design systems moved toward them?

senior
18. Component patterns

A shared Dialog component has grown 15 props: title, subtitle, icon, primaryLabel, footerAlign and so on. Every new design adds another. What would you change?

senior
19. Forms

What's the difference between a controlled and an uncontrolled input?

basic
19. Forms

What causes the warning "A component is changing an uncontrolled input to be controlled"?

intermediate
19. Forms

Is React's onChange the same as the DOM change event?

intermediate
19. Forms

Why doesn't a reset button clear a controlled form, and how do you fix it?

intermediate
19. Forms

How do you approach validation in a React form?

senior
19. Forms

A form has two submit buttons, Save and Publish. How does the submit handler know which was clicked?

senior
20. Class components

Map the main class lifecycle methods to hooks.

basic
20. Class components

Is useEffect(fn, []) the same as componentDidMount?

intermediate
20. Class components

How does this.setState differ from a useState setter?

basic
20. Class components

Why did React move from classes to hooks?

intermediate
20. Class components

What is getDerivedStateFromProps for, and why is it usually the wrong tool?

senior
20. Class components

What does getSnapshotBeforeUpdate do, and how would you get the same result with hooks?

senior
21. Errors

What does an error boundary catch, and what doesn't it catch?

basic
21. Errors

Why are error boundaries still class components?

intermediate
21. Errors

What happens when a render error isn't caught by any boundary?

basic
21. Errors

What are onCaughtError, onUncaughtError and onRecoverableError?

intermediate
21. Errors

How do you decide where to put error boundaries, and how do you recover from an error?

senior
21. Errors

What's an Owner Stack, and how is it different from a component stack?

senior
22. Portals and Profiler

When do you need a portal?

basic
22. Portals and Profiler

How do events behave inside a portal?

intermediate
22. Portals and Profiler

What does an accessible modal need beyond a portal?

senior
22. Portals and Profiler

What does <Profiler>'s onRender tell you?

intermediate
22. Portals and Profiler

Can you use <Profiler> in production?

senior
23. Rendering and scheduling

What causes a React component to re-render?

basic
23. Rendering and scheduling

Why does a child re-render when its parent re-renders, even if its props are the same?

intermediate
23. Rendering and scheduling

A user types without pausing, and every keystroke interrupts a slow transition. Can that transition be starved forever?

senior
23. Rendering and scheduling

How does React decide which update to process first?

senior
23. Rendering and scheduling

What does flushSync do and when would you use it?

intermediate
23. Rendering and scheduling

React 18 made rendering concurrent. So why does typing still lag when a slow component re-renders on each keystroke?

senior
24. Transitions

What is a transition in React?

basic
24. Transitions

How is useTransition different from debouncing?

intermediate
24. Transitions

When would you use useDeferredValue instead of useTransition?

intermediate
24. Transitions

What happens if you put a controlled input's value update inside startTransition?

intermediate
24. Transitions

How do async transitions work, and what's the catch with await?

senior
24. Transitions

What changed about transitions in React 19.3?

senior
24. Transitions

You wrapped a slow list update in startTransition but typing is still janky. What would you check?

senior
25. Actions

What is an Action in React 19?

basic
25. Actions

What does React do when a form's action prop is a function?

intermediate
25. Actions

How does useOptimistic work, and how does it roll back a failed update?

intermediate
25. Actions

Why does useFormStatus always return pending: false in some components?

basic
25. Actions

How should you handle errors in Actions?

senior
25. Actions

A user double-clicks submit on a form using useActionState. What happens?

senior
26. Suspense and use

What does it mean for a component to suspend?

basic
26. Suspense and use

Why must the promise passed to use() be cached? What happens if it isn't?

intermediate
26. Suspense and use

Compare fetch-on-render, fetch-then-render and render-as-you-fetch.

senior
26. Suspense and use

What happens when an already visible Suspense boundary suspends again?

intermediate
26. Suspense and use

How does React decide when to reveal Suspense content?

senior
26. Suspense and use

How does lazy() work, and where should you use it?

basic
26. Suspense and use

How do you handle a failed load with Suspense?

intermediate
27. Activity and View Transitions

What does <Activity> do, and how is it different from conditional rendering?

basic
27. Activity and View Transitions

How can Activity make a screen appear instantly?

intermediate
27. Activity and View Transitions

How does <ViewTransition> work?

intermediate
27. Activity and View Transitions

Why doesn't my ViewTransition animate when I call setState?

intermediate
27. Activity and View Transitions

What is addTransitionType for?

senior
27. Activity and View Transitions

Would you ship Activity and ViewTransition to production today?

senior
28. Measure first

What's the difference between actualDuration and baseDuration in the Profiler's onRender callback?

intermediate
28. Measure first

What are the Core Web Vitals, and what are the thresholds?

basic
28. Measure first

How does a slow React render show up in INP, and what can you do about it?

intermediate
28. Measure first

When would you use the React DevTools Profiler versus the Performance tracks in Chrome DevTools?

intermediate
28. Measure first

Why shouldn't you trust profiling numbers from the development build?

basic
28. Measure first

Your colleague wants to wrap every component in memo because DevTools shows lots of re-renders. What do you say?

senior
29. Memoization

What's the difference between memo, useMemo and useCallback?

basic
29. Memoization

Why does passing an inline object or arrow function break React.memo?

basic
29. Memoization

How can you avoid unnecessary re-renders without memo, useMemo or useCallback?

intermediate
29. Memoization

When does memoization waste effort, or make things worse?

intermediate
29. Memoization

A component is wrapped in memo and its props haven't changed. Can it still re-render?

intermediate
29. Memoization

Can you rely on useMemo to keep a value, for example to make sure an effect runs only once?

senior
29. Memoization

What are the risks of passing a custom comparison function to memo?

senior
30. The React Compiler

What problem does the React Compiler solve, and what does it do to your code?

basic
30. The React Compiler

Walk me through how the compiler works internally.

senior
30. The React Compiler

What happens when code breaks the Rules of React under the compiler?

senior
30. The React Compiler

Is the React Compiler production-ready? Would you enable it?

intermediate
30. The React Compiler

Does the compiler make useMemo and useCallback obsolete?

intermediate
30. The React Compiler

How do you configure the compiler and adopt it in an existing codebase?

intermediate
31. Big UI

How does list virtualization work, and what are its trade-offs?

intermediate
31. Big UI

How do you decide where to code split a React app?

intermediate
31. Big UI

Your bundle doubled in size this quarter. How do you find out why and stop it happening again?

intermediate
31. Big UI

How do images affect Core Web Vitals, and what do you do about it?

basic
31. Big UI

When would you use a web worker instead of useDeferredValue or startTransition?

senior
31. Big UI

Design a table that shows 100,000 filterable, sortable rows and stays responsive on a mid-range phone.

senior
32. Kinds of state

How do you decide where a piece of state should live?

basic
32. Kinds of state

Why shouldn't you keep server data in a client store like Redux or Zustand?

intermediate
32. Kinds of state

What happens when you store derived data in state and keep it in sync with useEffect?

intermediate
32. Kinds of state

What state belongs in the URL, and what goes wrong if you keep it in component state instead?

basic
32. Kinds of state

Your shared client state changes several times a second and many components read different parts of it. Context or a store, and why?

senior
32. Kinds of state

A team puts everything in one global store: API responses, modal flags, form drafts. What are the costs, and how would you migrate?

senior
33. Build a store

Why does context cause unnecessary re-renders, and why doesn't React.memo help?

intermediate
33. Build a store

What is tearing, why does concurrent rendering make it possible, and how does useSyncExternalStore prevent it?

senior
33. Build a store

Walk me through building a minimal global store with selectors for React.

intermediate
33. Build a store

You want a store hook to accept selectors like s => ({ a: s.a, b: s.b }). How do you build that, and where does the trick stop working?

intermediate
33. Build a store

What changes when a global store is used with server rendering?

senior
33. Build a store

What do you give up by moving state from React into an external store?

senior
34. Redux Toolkit

Walk me through what happens when a Redux action is dispatched.

basic
34. Redux Toolkit

Why must reducers be pure and state immutable? What breaks if they aren't?

intermediate
34. Redux Toolkit

How can createSlice reducers mutate state if Redux requires immutability?

intermediate
34. Redux Toolkit

When do you need createSelector, and how does it work?

intermediate
34. Redux Toolkit

Would you choose Redux for a new React app today? Defend your answer.

senior
34. Redux Toolkit

What's the difference between createAsyncThunk and RTK Query, and when do you use each?

intermediate
35. Zustand

How does Zustand work under the hood?

intermediate
35. Zustand

Why does useStore((s) => ({ a: s.a, b: s.b })) crash in Zustand 5, and how do you fix it?

intermediate
35. Zustand

A WebSocket handler, outside any component, needs to push messages into state that components display. How do you do that with Zustand, and what should you watch for?

intermediate
35. Zustand

How do you use Zustand safely with server rendering, for example in Next.js?

senior
35. Zustand

What do the persist, devtools and immer middlewares do, and does their order matter?

intermediate
35. Zustand

Zustand and Redux Toolkit both sit on useSyncExternalStore. How do you choose between them?

senior
36. Atomic state

What is an atom in Jotai, and where does its value live?

basic
36. Atomic state

How do derived atoms work, and how do they compare with selectors in Redux?

intermediate
36. Atomic state

How do async atoms interact with Suspense and transitions?

intermediate
36. Atomic state

When would you choose atoms over a single store like Zustand or Redux?

senior
36. Atomic state

Does Jotai use useSyncExternalStore? What's the trade-off?

senior
36. Atomic state

A codebase still uses Recoil. What's its status, and how would you migrate?

intermediate
37. Reactive state and signals

What is fine-grained reactivity, and how does dependency tracking work?

intermediate
37. Reactive state and signals

Why doesn't React use signals?

senior
37. Reactive state and signals

How does MobX's observer make a component re-render?

intermediate
37. Reactive state and signals

MobX or Valtio: how do they differ?

intermediate
37. Reactive state and signals

What's the status of signals in JavaScript itself?

basic
37. Reactive state and signals

What happens when a MobX action updates state after an await?

senior
38. State machines

What does 'make impossible states impossible' mean in React state?

basic
38. State machines

How do you write useReducer as a state machine, and where do side effects go?

intermediate
38. State machines

What do statecharts add to plain state machines?

intermediate
38. State machines

What's the actor model in XState v5, and how does it connect to React?

senior
38. State machines

When is XState worth it, and when is it overkill?

senior
38. State machines

What happens when you send an XState machine an event its current state doesn't handle?

basic
39. Server state

What's the difference between server state and client state?

basic
39. Server state

Explain staleTime versus gcTime in TanStack Query.

intermediate
39. Server state

How should you design query keys?

intermediate
39. Server state

Walk me through an optimistic update with rollback.

senior
39. Server state

What happens when a user switches back to a tab running TanStack Query?

intermediate
39. Server state

Two components on the same screen call useQuery with the same key. What happens on mount, and later when the data changes?

intermediate
39. Server state

SWR or TanStack Query?

basic
40. URL and form state

When should state live in the URL?

basic
40. URL and form state

What's the difference between pushState and replaceState, and when do you use each?

intermediate
40. URL and form state

Why is React Hook Form uncontrolled, and what does that buy you?

intermediate
40. URL and form state

What does Zod give you that TypeScript types don't?

basic
40. URL and form state

How does a schema plug into React Hook Form, and what happens on submit?

senior
40. URL and form state

If the form validates with Zod on the client, why validate again on the server?

senior
41. Choosing state tools

Redux or Zustand for a new app?

senior
41. Choosing state tools

Does the React Compiler fix the re-render cost of Context?

intermediate
41. Choosing state tools

A team is committed to Redux and keeps API responses in hand-written slices with loading and error flags. What do you propose, without telling them to drop Redux?

senior
41. Choosing state tools

Do we still need state management libraries with Server Components?

senior
41. Choosing state tools

Is it ever right to copy a prop into state?

intermediate
41. Choosing state tools

A product search page has results from an API, filters, a sort order, a selected row, a compare tray that persists across pages, a draft review form and a results count. Where does each piece live?

intermediate
42. Rendering strategies

What are the trade-offs between client-side rendering and server-side rendering?

basic
42. Rendering strategies

Explain SSR, SSG and ISR. When would you use each?

basic
42. Rendering strategies

What problem does streaming SSR solve, and how does it work?

intermediate
42. Rendering strategies

What is Partial Prerendering and how is it different from streaming SSR?

senior
42. Rendering strategies

Are Server Components a replacement for SSR?

intermediate
42. Rendering strategies

How do Astro's islands and Qwik's resumability compare with React's approach?

senior
43. SSR and hydration

What is hydration, and why is it needed?

basic
43. SSR and hydration

What causes hydration mismatches and how does React 19 handle them?

intermediate
43. SSR and hydration

What happens on the wire when React streams a Suspense boundary?

senior
43. SSR and hydration

What is selective hydration?

intermediate
43. SSR and hydration

Why is renderToString considered legacy, and what replaced it?

basic
43. SSR and hydration

How do prerender and resume enable partial prerendering?

senior
43. SSR and hydration

React 19.3 added use(browser()). What does it do and when would you use it?

senior
44. Server Components

What are React Server Components?

basic
44. Server Components

What exactly does "use client" do?

intermediate
44. Server Components

What can you pass from a Server Component to a client component, and why those things?

intermediate
44. Server Components

How can a Server Component be rendered inside a client component?

intermediate
44. Server Components

What is the RSC payload and how does it get to the browser?

senior
44. Server Components

You wrapped getUser in React's cache(), but the database still sees several identical queries per request. What could be wrong?

senior
44. Server Components

What are the common mistakes teams make when adopting Server Components?

senior
45. Server Functions

What is a Server Function, and how does calling one work?

basic
45. Server Functions

What's the difference between a Server Function and a Server Action?

basic
45. Server Functions

How do you secure Server Functions?

senior
45. Server Functions

What does progressive enhancement mean for Server Functions?

intermediate
45. Server Functions

What happens to variables captured by an inline Server Function?

senior
45. Server Functions

What was the December 2025 React Server Components vulnerability, and what's the lesson?

senior
45. Server Functions

What are React's taint APIs and how much should you rely on them?

intermediate
46. The Next.js App Router

What happens when a user navigates between two pages that share a layout?

basic
46. The Next.js App Router

Why can't app/dashboard/error.tsx catch an error thrown in app/dashboard/layout.tsx?

intermediate
46. The Next.js App Router

Why does useSearchParams need a Suspense boundary in Next.js?

intermediate
46. The Next.js App Router

Why are params and searchParams Promises since Next.js 15?

intermediate
46. The Next.js App Router

How do parallel and intercepting routes work together to build a modal?

senior
46. The Next.js App Router

How does Link prefetching work in Next.js 16, and what changed recently?

senior
47. Data and mutations in Next.js

Why is checking authentication in a Next.js layout not enough?

senior
47. Data and mutations in Next.js

After a Server Action writes data, how do you get the UI updated? Compare updateTag, revalidateTag, revalidatePath and refresh.

intermediate
47. Data and mutations in Next.js

What's special about calling redirect() in a Server Action?

basic
47. Data and mutations in Next.js

What is proxy.ts and what should and shouldn't go in it?

intermediate
47. Data and mutations in Next.js

How do you use TanStack Query with the App Router?

intermediate
47. Data and mutations in Next.js

What does after() do, and when would you use it?

basic
48. Caching in Next.js

Explain the Cache Components model in Next.js 16.

intermediate
48. Caching in Next.js

What's the difference between updateTag and revalidateTag in Next.js 16?

intermediate
48. Caching in Next.js

Why can't you call cookies() inside "use cache", and what do you do instead?

intermediate
48. Caching in Next.js

What is the static shell, and how does partial prerendering work under Cache Components?

senior
48. Caching in Next.js

In the previous caching model (Next.js 14 and 15), what were the four layers, and how did you track down a stale page?

senior
48. Caching in Next.js

You deploy a Cache Components app to a serverless platform and runtime cache hits are near zero. Why, and what do you do?

senior
49. Rendering and deploying Next.js

How do you choose between static, dynamic and ISR for a page in Next.js 16?

intermediate
49. Rendering and deploying Next.js

What's special about NEXT_PUBLIC_ environment variables?

basic
49. Rendering and deploying Next.js

Node.js or Edge runtime in Next.js today?

basic
49. Rendering and deploying Next.js

What do you need to configure to self-host Next.js across multiple instances?

senior
49. Rendering and deploying Next.js

With Cache Components, what happens when someone requests a dynamic page that generateStaticParams didn't list?

senior
50. Next.js versions and the Pages Router

What changed between Next.js 14, 15 and 16?

intermediate
50. Next.js versions and the Pages Router

In the Pages Router, what's the difference between getServerSideProps and getStaticProps?

basic
50. Next.js versions and the Pages Router

How do Pages Router concepts map onto the App Router?

intermediate
50. Next.js versions and the Pages Router

What's the biggest risk when upgrading a Next.js 14 App Router app to 15?

senior
51. Caching across the stack

How would you approach caching in a React application?

senior
51. Caching across the stack

What's the difference between Cache-Control no-cache, no-store, private and immutable?

intermediate
51. Caching across the stack

Why do build tools put hashes in asset filenames, and how should HTML be cached?

basic
51. Caching across the stack

What's the difference between React's cache() and Next.js "use cache"?

intermediate
51. Caching across the stack

A user writes data and still sees the old value. How do you find the stale cache?

senior
52. Starting a React app

How would you start a new React app today?

basic
52. Starting a React app

Why was Create React App deprecated?

intermediate
52. Starting a React app

What does a bundler actually do?

intermediate
52. Starting a React app

Why is Vite's dev server fast, and how does HMR keep component state?

senior
52. Starting a React app

What's the difference between Babel, SWC, Oxc and tsc?

intermediate
52. Starting a React app

Next.js or React Router's framework mode: how would you decide?

senior
53. Routing

How does client-side routing work under the hood?

basic
53. Routing

Why do routers like React Router have loaders instead of fetching in components?

intermediate
53. Routing

What are nested routes, and what does Outlet do?

basic
53. Routing

What happens after a form submits to a route action in React Router?

senior
53. Routing

React Router or TanStack Router: how do they differ?

senior
53. Routing

What changed in React Router v7 and v8?

intermediate
54. TypeScript with React

What's the difference between ReactNode, ReactElement and JSX.Element?

basic
54. TypeScript with React

How do you type refs in React 19, including passing a ref to a child?

intermediate
54. TypeScript with React

How would you model loading, error and success state in TypeScript?

intermediate
54. TypeScript with React

When and how do you write a generic component?

intermediate
54. TypeScript with React

How do you type a polymorphic as prop, and is it worth it?

senior
54. TypeScript with React

Your Vite app builds and deploys with type errors in it. How is that possible, and what do you change?

senior
55. Styling

What are the main ways to style React components, and their trade-offs?

basic
55. Styling

Why doesn't runtime CSS-in-JS work well with Server Components?

senior
55. Styling

How do CSS Modules work?

intermediate
55. Styling

How does Tailwind decide which CSS to generate, and what bug does that cause?

intermediate
55. Styling

Headless component library, styled kit, or shadcn/ui: how do you choose?

senior
56. Testing

What is React Testing Library's philosophy, and why does it matter?

basic
56. Testing

What does act() do, and what does the 'not wrapped in act' warning mean?

intermediate
56. Testing

What's the difference between getBy, queryBy and findBy?

basic
56. Testing

How would you mock API calls in component tests?

intermediate
56. Testing

How do you balance unit, integration and end-to-end tests in a React app?

senior
56. Testing

What shouldn't you test in a React codebase?

senior
57. Accessibility

How do you make a React app accessible?

basic
57. Accessibility

What does 'no ARIA is better than bad ARIA' mean?

intermediate
57. Accessibility

What is an accessible name, and how is it computed?

intermediate
57. Accessibility

What happens to focus on a client-side route change, and what should you do about it?

senior
57. Accessibility

How do you announce an update that happens away from focus, like 'Saved'?

intermediate
57. Accessibility

How should keyboard navigation work in a custom listbox, menu or tab list?

senior
58. Tooling and DX

What does eslint-plugin-react-hooks check, and why does it matter more now?

intermediate
58. Tooling and DX

exhaustive-deps says your effect is missing a dependency, but adding it causes a loop. What do you do?

senior
58. Tooling and DX

What is ESLint flat config, and what changed in ESLint 10?

basic
58. Tooling and DX

In React DevTools, what's the difference between a component's parent and its owner?

senior
58. Tooling and DX

What does Storybook give you beyond unit tests?

intermediate
59. The production checklist

React escapes output by default. How can a React app still have an XSS vulnerability?

intermediate
59. The production checklist

A secret API key turned up in your client JavaScript. What are the ways that happens in a React or Next.js app, and how do you make it structurally hard?

basic
59. The production checklist

What protects a Next.js Server Action against CSRF, and where does that protection stop?

senior
59. The production checklist

How would you set up error monitoring for a React 19 app?

intermediate
59. The production checklist

You want a strict CSP with nonces on a Next.js site. What does it cost?

senior
59. The production checklist

How do you know whether your React app is fast for real users?

intermediate
59. The production checklist

A deploy broke checkout. Walk me through rolling back, and what can make rollback fail.

senior
60. Architecture at scale

Feature-based or layer-based folders? Defend your choice.

basic
60. Architecture at scale

How do you keep module boundaries from eroding in a large codebase?

intermediate
60. Architecture at scale

When are micro-frontends worth it, and when do they hurt?

senior
60. Architecture at scale

What does a monorepo tool like Turborepo or Nx actually give you?

intermediate
60. Architecture at scale

Where should data access live in a Next.js App Router app?

intermediate
60. Architecture at scale

tRPC, GraphQL or OpenAPI: how do you choose?

senior
61. React versions

What changed in React 18, and what did you have to do to get it?

intermediate
61. React versions

What happens when you call two state setters inside a setTimeout, in React 17 versus React 18?

basic
61. React versions

React 17 had no new features. Why did it matter?

intermediate
61. React versions

What was removed in React 19, and which removals are dangerous?

intermediate
61. React versions

How would you upgrade a large production app from React 18 to 19?

senior
61. React versions

What's the difference between React's stable, canary and experimental channels? Next.js uses canary React. Is that a problem?

senior
61. React versions

What have the React 19 minor releases added that you'd actually use?

intermediate
62. Interview rehearsal

Give me your mental model of React in about a minute.

intermediate
62. Interview rehearsal

How do you decide where a piece of state should live?

senior
62. Interview rehearsal

A React page feels slow. How do you find and fix the problem?

senior
62. Interview rehearsal

In a Next.js App Router app, trace a piece of data from the database to the screen, and then a button click that changes it.

senior
62. Interview rehearsal

When would you not use Server Components?

senior
62. Interview rehearsal

How do you design loading and error states across a React app?

senior
62. Interview rehearsal

What's a React misconception you hear often, and what's actually true?

intermediate