Old architecture vs. new architecturePart 2 of 14

The old architecture

Four threads, one JSON bridge, and why it had to go

BeginnerVerified on React Native 0.88Updated 6 December 2026

Read first: Vocabulary

The big idea#

None of this runs in current React Native. It's still worth understanding, because every piece of the new architecture exists to fix one specific problem of the old one, and because old-style code still appears in many npm packages.

Concepts#

The threads#

  • JS thread: runs the JavaScript bundle (React, state, business logic). There's only one.
  • UI (main) thread: the platform's own thread. Only it may touch real views, and it receives touches.
  • Shadow thread: keeps a copy of the view tree (the "shadow tree") and runs Yoga to calculate layout.
  • Native modules thread(s): where native module calls like storage reads actually ran.

The bridge#

All communication between JS and native went through one channel:

  • On the JS side, MessageQueue collected every call as [moduleId, methodId, args, callbackId].
  • Calls were batched and flushed together, then serialized to JSON.
  • Native code parsed the JSON, found the method by ID, and ran it.
  • Results came back the same way, and only through callbacks or Promises. A method could never just return a value.

The old architecture

JS threadReact, your logic
BridgeJSON, async, batched
Shadow threadYoga layout
UI threadDraws, gets touches

Boxes: JS thread (React, your logic); Bridge (JSON, async, batched); Shadow thread (Yoga layout); UI thread (Draws, gets touches). Arrows: JS thread to Bridge; Bridge to Shadow thread; Shadow thread to UI thread; UI thread to Bridge (dashed); Bridge to JS thread (dashed).

Every message crossed one asynchronous, JSON-serialized bridge.
  • JavaScript
  • Legacy
  • Native

One tap, end to end#

One tap in the old architecture

UI threadReceives touch
BridgeSerialize event
JS threadonPress, React diff
BridgeUIManager commands
Shadow threadYoga layout
UI threadUpdates views

Boxes: UI thread (Receives touch); Bridge (Serialize event); JS thread (onPress, React diff); Bridge (UIManager commands); Shadow thread (Yoga layout); UI thread (Updates views). Arrows: UI thread to Bridge; Bridge to JS thread; JS thread to Bridge; Bridge to Shadow thread; Shadow thread to UI thread.

5 steps

Two bridge crossings and two JSON round trips for one tap.
  • Native
  • Legacy
  • JavaScript

The problems#

ProblemWhat it meantSymptom
Asynchronous onlyJS could never get an answer immediately; even measure() used a callbackLayout jumps: render, measure a frame later, move
One JS threadTouch handling, JS-driven animations and business logic shared one threadHeavy JS freezes touch responses
SerializationEvery message was copied into a string and parsed back; nothing shared by referenceBig payloads (Base64 images, long lists) were slow
One shared laneEvery message waited in the same queueBlank cells on fast scroll, dropped animation frames
Eager startupEvery native module created at launch, used or notSlow startup with many native libraries
Per-platform renderersRendering logic written separately in Java and Objective-CPlatform-specific bugs

Workarounds that predicted the future#

  • useNativeDriver: true sent an animation to native code once, so frames didn't cross the bridge.
  • Reanimated worklets ran small JS functions on the UI thread in a separate runtime, possible only because of JSI.
  • Passing file paths instead of Base64 avoided serializing large data. Since 0.88, ArrayBuffer solves this properly.

Myths vs reality#

Myth

The bridge was single-threaded, so computation had to happen on one thread

Reality: the bridge itself wasn't the single thread. The problem is that there was one JS thread, and everything JS-related (events, animations, logic) had to share it while waiting on an asynchronous queue.

In practice#

When reading native code in npm packages, these are legacy-bridge fingerprints:

  • Android: a module that extends ReactContextBaseJavaModule directly (not a generated Native…Spec), ReactPackage.createNativeModules(), view managers without a generated …ManagerInterface.
  • iOS: RCT_EXPORT_METHOD(...), RCTViewManager subclasses with RCT_EXPORT_VIEW_PROPERTY.
  • JS: NativeModules.X and requireNativeComponent('X') instead of Native*.ts specs.

In one sentence

The old architecture forced every exchange between JS and native through one slow, asynchronous, JSON-serialized channel that copied everything, could never answer immediately, and created every module at startup.