We run mock interviews every Saturday, and the same React questions come up batch after batch. Here are the ones worth preparing properly.
Fundamentals
- What is the virtual DOM and why does React use it? Talk about reconciliation and batching, not just "it's faster".
- Difference between state and props? Ownership and mutability.
- What are keys and why do they matter in lists? Explain what goes wrong when you use the array index.
- Controlled vs uncontrolled components.
- What does `useEffect` actually do, and when does it run?
Hooks
- Why can't you call hooks inside conditions?
- Explain
useMemovsuseCallback— and when not to use them. - How would you write a custom hook for fetching data?
- What problem does
useRefsolve beyond DOM access? - What is stale closure and how does it show up with
setInterval?
State management
- When do you reach for Context vs a library like Zustand or Redux?
- How do you avoid unnecessary re-renders with Context?
- Explain lifting state up with an example.
Performance
- What is code splitting and how do you do it in React?
- How does
React.memowork, and why might it make things slower? - How would you debug a component that re-renders too often?
Modern React
- Server Components vs Client Components — what runs where?
- What are Suspense boundaries?
- How do you handle forms with Server Actions?
Practical / coding
- Build a debounced search input.
- Implement a simple modal with focus trapping.
- Write a component that paginates an API.
- Fix a given component that has a memory leak.
Behavioural
- Walk us through a bug you found in production.
- How do you review someone else's pull request?
How to prepare
Don't memorise answers. For every question, build a 20-line example in CodeSandbox. When you've written the stale-closure bug yourself, you never forget the explanation.
Learn this properly
