25 React Interview Questions & Modern Answers for 2026
659 words · Reviewed for accuracy

React interviews have a tell: they almost always circle back to state and rendering. Not JSX trivia, not the difference between a class and a function component — but whether you understand when React re-renders, why, and how to stop it from doing so wastefully. Master that mental model and the rest of the interview feels like conversation.
Part of our interview questions by role hub — practice live with the AI coding copilot.
The key idea: React re-renders a component when its state or props change — and by default, it re-renders that component's entire subtree. Most performance questions are really this one sentence wearing a costume.
The question taxonomy
- Hooks mechanics.
useState,useEffect(especially the dependency array and cleanup),useMemo/useCallback, and the rules of hooks. - Rendering behaviour. Reconciliation, keys in lists, why lifting state up causes re-renders, when
React.memohelps. - State architecture. Local state vs context vs a store; when context alone causes render storms.
- Data fetching. Effects vs a query library, race conditions, cancellation.
- Practical coding. Build a debounced search, a custom hook, or a small form with validation.
Worked example: the stale closure trap
"This counter should increment every second but stays stuck — why?" This is the single most diagnostic React question:
function Counter() {
const [count, setCount] = useState(0);
useEffect(() => {
const id = setInterval(() => {
setCount(count + 1); // BUG: 'count' is captured from render 0
}, 1000);
return () => clearInterval(id);
}, []); // empty deps: closure never sees new count
return <p>{count}</p>;
}
The fix — and the sentence that earns the points — is the functional update form: setCount(c => c + 1). Then explain why: the interval callback closed over the initial render's count, so it kept adding one to zero. If you can also mention that adding count to the deps would fix it but recreate the interval every tick, you've shown genuine fluency, not memorisation.
How answers get scored
Rubrics typically reward: a correct mental model of the render cycle, knowing when not to optimise (reaching for useMemo everywhere is a junior tell), and clean effect hygiene — no missing dependencies, always returning cleanup for subscriptions and timers. Building something that works while explaining why it works beats a flashy solution every time.
Common mistakes
- Mutating state directly and wondering why nothing re-renders.
- Using array indexes as keys in a list that reorders.
- Putting data fetching in an effect with no race-condition handling.
- Wrapping everything in
useMemo"for performance" without measuring.
The take-home and live-build formats
Expect one of two practical formats. In a timed live build, you get a small spec — an autocomplete, a paginated list, a form with validation — and roughly an hour. The winning strategy is boring: get the simplest working version running in the first twenty minutes, then layer polish (loading state, error handling, keyboard support) while narrating trade-offs. In a take-home, they're reading your code like a pull request: component decomposition, sensible naming, no dead code, a README that explains how to run it and what you'd do next. In both formats, the fastest way to lose points is chasing a clever abstraction while the basic requirement stays broken. Ship the plain thing first. Interviewers would rather review a simple component done completely than an elaborate one done halfway — because that's the judgment they need from you on a Tuesday afternoon at work.
FAQ
Do class components still come up? Rarely for writing, but you should recognise lifecycle methods and be able to map them to hooks — many codebases still have both.
Will I be asked about React Server Components or the compiler? In 2026, increasingly yes at a conceptual level: what they are and what problem they solve. Deep internals, no.
Round this out with the frontend interview guide for the JavaScript fundamentals underneath, and rehearse component builds with mock practice.