Most React interviews test whether a candidate can write a component. That's the easy part. What separates a developer who ships stable features from one who creates next quarter's refactor is how they read code — spotting the re-render storm, the stale closure, the effect that should never have been an effect.
So instead of a whiteboard puzzle, give candidates a 120-line component with problems baked in and ask them to review it out loud. Below are eight questions that work well, what a strong answer sounds like, and the red flags to listen for.
1. "Why does this component re-render, and should it?"
Show a parent that passes a new object or inline function on every render to a memoised child.
Strong answer: They notice that React.memo is defeated by the new reference, explain that a re-render isn't automatically a problem, and ask whether the child is actually expensive before reaching for useMemo / useCallback. They may mention the React Compiler and how it changes this calculus.
Red flag: Wrapping everything in useMemo "for performance" without measuring.
2. "What's wrong with this useEffect?"
const [fullName, setFullName] = useState(''); useEffect(() => { setFullName(`${first} ${last}`); }, [first, last]); Strong answer: "This shouldn't be state at all — derive it during render." Seniors know that effects are for syncing with external systems, not for transforming props.
Red flag: Adding more dependencies or a second effect to "fix" the extra render.
3. "Where should this state live?"
Give a form where three sibling components each keep a copy of the same selected item.
Strong answer: Lift it to the closest common parent, or move it to the URL if it should survive a refresh or be shareable. They'll ask whether it's server state (then a data-fetching library such as TanStack Query owns it) or UI state.
Red flag: Jumping straight to a global store for something two components share.
4. "Find the stale closure."
useEffect(() => { const id = setInterval(() => setCount(count + 1), 1000); return () => clearInterval(id); }, []); Strong answer: The interval captures count from the first render. Fix with the updater form setCount(c => c + 1), not by adding count to the dependency array and recreating the interval every second.
Red flag: Disabling the react-hooks/exhaustive-deps lint rule.
5. "How would you test this?"
Strong answer: Test behaviour through the UI the user sees — React Testing Library queries by role and label — rather than asserting on internal state or implementation details. They'll mock the network at the boundary (for example with MSW), not mock their own hooks.
Red flag: Snapshot tests as the whole strategy.
6. "What happens when this list has 5,000 rows?"
Strong answer: Keys must be stable IDs, not array indexes. Beyond that, virtualise the list, paginate, or move filtering to the server. They'll ask what the real data size is before optimising.
Red flag: "React is fast, it'll be fine."
7. "Is this accessible?"
Show a <div onClick> styled as a button and an icon-only button with no label.
Strong answer: Use a real <button>, add an accessible name, check focus order and visible focus styles, and make sure error messages are announced. Accessibility awareness is one of the clearest signals of seniority in front-end work, because it's rarely taught and always noticed by users.
Red flag: Treating accessibility as a "later" ticket.
8. "What would you change first, and what would you leave alone?"
This is the most revealing question. A senior developer prioritises: fix the bug that causes wrong data, then the one that hurts users, then readability. They'll also say which "imperfect" code isn't worth touching right now.
Red flag: Wanting to rewrite the whole component in their preferred pattern.
How to run the review session
- Send nothing in advance. Share the file at the start of a 45-minute call.
- Let them drive. Ask them to narrate what they notice before you prompt any question.
- Score on four axes: correctness, prioritisation, communication, and trade-off awareness. Raw speed matters least.
- Finish with a small change. Ask them to implement the fix they ranked first. Twenty minutes of real coding tells you more than an hour of trivia.
A short scoring rubric
| Signal | Junior | Mid | Senior |
|---|---|---|---|
| Finds the derived-state effect | Rarely | Usually | Always, and explains why |
| Stale closure fix | Adds dependency | Updater function | Updater + explains the mental model |
| State placement | Global store | Lifts state | Asks "server or UI state?" first |
| Accessibility | Not mentioned | When prompted | Unprompted |
| Prioritisation | Fixes everything | Fixes bugs first | Fixes bugs, defends what to leave |
When you don't have time to build this process
Designing review exercises, calibrating interviewers and running trials takes weeks. If you need to hire React developers who have already been through this kind of review, teams like Mpiric Software offer pre-vetted dedicated developers you can interview yourself before they join your sprint.
Either way, swap the algorithm puzzle for a code review. You'll learn in 45 minutes how a candidate will behave in your pull requests for the next two years.
What's the one question you always ask in React interviews? Share it in the comments.
