Performance: measure, then fix · senior
Keeping the JS thread free: splitting and deferring work
When work must run on the JS thread, you keep the app responsive by doing less, splitting long tasks into small chunks, deferring non-urgent work with requestIdleCallback (InteractionManager was removed in 0.87), marking slow renders as transitions, or moving the work to native code, a worklet runtime or the server.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Any JS task longer than one frame (16.7 ms at 60 Hz) delays taps and JS animations. Long tasks must be split or moved.
- InteractionManager.runAfterInteractions was removed in 0.87. The performance docs point to requestIdleCallback for non-urgent work.
- Chunking: process N items, then yield with setTimeout(step, 0) so taps and frames can run between chunks.
- startTransition and useDeferredValue keep typing urgent while an expensive render waits. They do not make the work smaller and do not use another thread.
- Native-stack transitions run on the UI thread, so a busy JS thread hurts them less than JS-stack transitions.
- Offload: precompute on the server, paginate or stream big payloads, use an async native module or a worklet runtime for CPU-heavy work.
- For taps that feel slow, the docs suggest doing the heavy part inside requestAnimationFrame so the press feedback paints first.
The red pen
Common traps: mistake → fix
Mistake: "Use InteractionManager.runAfterInteractions"
Fix: removed in 0.87; use requestIdleCallback.
Mistake: "startTransition runs work in the background"
Fix: it only lets React interrupt and re-prioritise rendering.
Mistake: "Use a Web Worker"
Fix: React Native has no built-in Web Workers.
Easy to hard
Questions interviewers ask, easy to hard
- After navigating you must run an expensive computation without janking the transition. What do you use in 2026?
- Filtering 5,000 items on each keystroke lags. How do concurrent features help, and where do they not?
- The work takes 800 ms no matter what. What now?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.