JavaScript Thread

Also called JS thread

Updated

What is JavaScript Thread in React Native?

The JavaScript thread is where your React components, business logic and event handlers run. Blocking it makes the app feel frozen even though native rendering continues.

JS thread
Your tap’s onPressQueued taskThread blockedRenders, hooks, event handlers and network callbacks all run on the single JavaScript thread, one after another. A long task, like parsing a large JSON payload or mapping thousands of records on every render, blocks everything behind it: the button responds late even though scrolling, which the UI thread handles, keeps moving. Move the work off the render path, paginate it, or take animations off this thread with worklets. Times in the figure are not real milliseconds.

The JavaScript thread is the single thread where your application code executes: component renders, hooks, event handlers, network callbacks, and state updates all queue here.

It is separate from the UI thread, which draws the actual pixels. That separation is why a React Native app can stay visually responsive — a scroll can keep moving natively — while your JavaScript is stuck.

Because it is single-threaded, anything expensive blocks everything else:

  • Parsing a large JSON payload
  • A heavy map/filter over thousands of records on every render
  • Synchronous work inside a useEffect that runs on mount

Symptoms are a button that responds a second late, or a setState-driven animation that stutters. The fixes are to move work off the render path (useMemo, pagination, background native modules) or to move animation off this thread entirely with worklets.

Profiling the JS thread is the first step in almost any React Native performance investigation.