Skip to the page

How React Native runs your app · core

Threads and frames: what "dropping frames" means

A React Native app runs your JavaScript and React on one JS thread and draws native views on the UI (main) thread; each thread has about 16.7 ms per frame at 60 Hz (8.3 ms at 120 Hz), and when work does not fit in that budget, frames are dropped and the user sees jank.

The notes

What you must know

  • JS thread: runs your JavaScript, React's render phase and your event handlers. There is only one. A long task here delays every other piece of JS: taps, timers, JS-driven animations.
  • UI (main) thread: the only thread allowed to create and change native views. It also runs native scrolling, native-stack transitions and native-driven animations.
  • Background thread: on the New Architecture the commit step (Yoga layout and building the next shadow tree) can run off the JS thread. Native modules can use their own queues.
  • Frame budget = 1000 ms / refresh rate: 16.67 ms at 60 Hz, 11.11 ms at 90 Hz, 8.33 ms at 120 Hz. A 45 ms JS task at 60 Hz drops about 2 frames.
  • JS frame rate and UI frame rate are separate. If JS is blocked, a ScrollView still scrolls, but press feedback, JS animations and anything waiting for JS freeze.
  • An ANR (Android "App Not Responding") means the MAIN thread is blocked for about 5 seconds. A busy JS thread usually causes jank, not an ANR.
  • Reanimated adds a second JS runtime that runs small functions (worklets) on the UI thread, so gesture and scroll animations do not wait for the JS thread.
  • Always judge smoothness in a release build. Dev mode makes the JS thread much slower.

The red pen

Common traps: mistake → fix

  • Mistake: "React Native runs my JavaScript on many threads"

    Fix: your app code runs on ONE JS thread. JSI does not add threads for your code.

  • Mistake: "If JS is busy, the whole app freezes"

    Fix: native scrolling and native-stack transitions keep running on the UI thread. Only JS-driven work freezes.

  • Mistake: "Jank and ANR are the same thing"

    Fix: an ANR is a main thread blocked for about 5 s. Jank is dropped frames.

  • Mistake: "The budget is always 16 ms"

    Fix: many phones run at 90 or 120 Hz, where the budget is 11 ms or 8.3 ms.

Easy to hard

Questions interviewers ask, easy to hard

  1. How many threads does a React Native app have, and what runs on each?
  2. What does "dropping frames" mean? What is the frame budget at 60 Hz and at 120 Hz?
  3. You parse a 20 MB JSON when a button is pressed. What freezes and what keeps working?
  4. Can a busy JS thread cause an ANR? What does cause one?
  5. How would you move that 20 MB parse off the JS thread?

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview