React performance · Scenario
Optimise a React app that suffers from frequent re-renders (step by step)
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
Explain how you would optimise a React application that's suffering from frequent re-renders and slow UI updates. I want your step-by-step approach, not a list of tools.
Then
Follow-ups the interviewer asks next
- What exactly do you look at in the Profiler flamegraph and ranked view?
- The bottleneck is a 3 MB JSON parse, not React: now what?
- How do you prove the fix worked in production?
- Where does the React Compiler fit?
The answer
What a strong answer covers
- Reproduce and measure: React DevTools Profiler (commit durations, "why did this render"), the Chrome Performance panel, React Performance Tracks (19.2), and INP in the field.
- Classify the cost: too many renders, expensive renders, too much DOM, layout thrash, network, or main-thread JS.
- Fix in order:
- colocate state, split context
- virtualise
- move work off the render path (memo, workers)
useTransition/useDeferredValuefor non-urgent updates- code-split
- Verify with before/after numbers, RUM and Web Vitals, and add guardrails (perf budgets, CI checks).
The red pen
Common traps
Avoid:jumping straight to "useMemo everything"; no measurement; ignoring field data.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.