Skip to the page

React performance · Scenario

Optimise a React app that suffers from frequent re-renders (step by step)

The 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

  1. What exactly do you look at in the Profiler flamegraph and ranked view?
  2. The bottleneck is a 3 MB JSON parse, not React: now what?
  3. How do you prove the fix worked in production?
  4. 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/useDeferredValue for 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 voice

Practise 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.

Start your free interview