UI Thread (Main Thread)

Also called Main thread, Native UI thread

Also known as
Main thread, Native UI thread
Updated

What is UI Thread (Main Thread) in React Native?

The UI thread is the platform thread that measures, lays out and draws native views. Everything the user sees is painted here, at 60 or 120 frames per second.

The UI thread — the main thread in iOS and Android terminology — is where the operating system measures, lays out, and draws native views. Every frame the user sees is produced here, which on a modern phone means a budget of about 16ms per frame at 60Hz, or 8ms at 120Hz.

React Native runs your code on the separate JavaScript thread and hands the results to the UI thread through the Fabric renderer. Two distinct kinds of jank follow from that split:

  • JS-thread jank — logic is slow, so new frames are described too late. The screen keeps scrolling but content arrives blank.
  • UI-thread jank — the view hierarchy itself is expensive: huge images, heavy shadows, deeply nested layouts. Frames are dropped even with idle JavaScript.

Knowing which thread is saturated decides the fix, and they are opposite fixes. Worklets exist precisely so animations can run on this thread and survive a busy JavaScript thread.