React Native's New Architecture: From Bridge to Bridgeless

July 7, 2025 (6d ago)

The only constant in life is change.

[— Heraclitus]

If you've been in the React Native world for a while, you've probably heard whispers of the "new architecture." For years, the "bridge" was a core concept in React Native, but it was also the source of many performance bottlenecks. Now, with the bridgeless architecture, things are changing for the better.

But what does that actually mean? Let's break down how the old system worked, why it had problems, and how the new architecture is a massive leap forward.

First, A Quick Word on JavaScript's Single Thread

Before we dive in, it's crucial to remember one thing: JavaScript is single-threaded. This means it can only do one thing at a time. If your app is busy running complex business logic in JavaScript, it can't also be responding to user input or updating the UI at that exact same moment.

React Native was cleverly designed around this limitation. It runs your JavaScript code on its own thread while the native UI (the stuff you actually see and touch on the screen) runs on a separate, dedicated UI thread. This is key to keeping the app responsive. The challenge, however, has always been how to make these two threads talk to each other efficiently.

The Old Way: The Bridge Architecture

For years, React Native used a "bridge" to connect your JavaScript code with the native side of your application (Java/Kotlin on Android, Objective-C/Swift on iOS).

Imagine three separate workers (threads) in a factory:

  1. The JS Thread: This is where all your React components live and your business logic runs.
  2. The Native (UI) Thread: This is the main thread that handles rendering the UI and processing user gestures.
  3. The Shadow Thread: This worker takes the UI layout defined in your JavaScript (using Yoga), calculates where everything should go on the screen, and then passes that information to the Native Thread.

These three threads couldn't talk to each other directly. Instead, they had to send messages through a central dispatcher: The Bridge.

Here’s a simplified visual:

+------------------+                      +----------------------+
|    JS Thread     |                      |   Native (UI) Thread |
| (React, Logic)   |                      |   (Renders pixels)   |
+------------------+                      +----------------------+
        ^                                         ^
        |                                         |
        +------------------+<------>+------------------+
                           | Bridge |
        +------------------+<------>+------------------+
        |                                         |
        v                                         v
+------------------+
|  Shadow Thread   |
| (Layout Calcs)   |
+------------------+

The Problem with the Bridge

While this system worked, it had some serious bottlenecks:

  1. Asynchronous Communication: The bridge was entirely asynchronous. When the JS thread sent a message to the native side (e.g., "update this text"), it would "fire and forget." It couldn't wait for a response. This made it very difficult to have synchronous, real-time interactions.
  2. Serialization Overhead: Every message sent over the bridge had to be serialized into a JSON string and then deserialized on the other side. This is like having to package every word you say into a box, ship it, and then have the receiver unpack it. It's slow, especially for large amounts of data or frequent messages (like tracking a user's finger as they drag something across the screen).
  3. Congestion: All communication had to go through this single bridge. If there were a lot of messages, it would create a traffic jam, leading to delays and a sluggish user experience.

The New Way: The Bridgeless Architecture (JSI)

The new architecture gets rid of the bridge entirely. The star of the show is a new piece of technology called the JavaScript Interface (JSI).

JSI is a lightweight, general-purpose API written in C++ that allows the JavaScript thread to communicate directly and synchronously with the native side. It's like giving your JavaScript code a direct phone line to the native world.

Here’s how the new system looks:

+------------------+   <-- JSI -->   +----------------------+
|    JS Thread     |   (Direct &     |   Native (UI) Thread |
| (React, Logic)   |   Synchronous)  |   (Renders pixels)   |
+------------------+   <-- Calls -->   +----------------------+

Key Components of the New Architecture

  1. JavaScript Interface (JSI): As mentioned, this allows for direct communication. JavaScript can now hold a reference to a C++ object and call methods on it as if it were a regular JavaScript object. This eliminates the serialization overhead and the asynchronous bottleneck.
  2. Fabric: This is the new rendering system. It's a C++-based system that allows for more direct and efficient UI rendering. With JSI, JavaScript can now tell Fabric to create and update UI elements synchronously, leading to much smoother animations and interactions.
  3. TurboModules: These are the next generation of Native Modules. They are loaded only when needed ("lazy loading") and expose their methods to JavaScript via JSI. This means you can call a native function (like accessing the device's calendar) directly and synchronously from your JS code.
  4. CodeGen: This is a static type checker that automatically generates the "glue" code (the C++ interfaces) needed for TurboModules and Fabric to talk to JavaScript. This ensures everything is type-safe and reduces the amount of boilerplate code developers have to write.

What This Means for Developers and Users

The shift to a bridgeless architecture is a massive win for React Native:

  • Better Performance: By eliminating the serialization overhead and the asynchronous bottleneck, apps feel faster and more responsive. Animations are smoother, and high-frequency events (like gestures) are handled more gracefully.
  • Improved Developer Experience: The ability to call native methods synchronously simplifies a lot of complex code.
  • More Powerful Apps: The new architecture opens the door for more complex and demanding applications to be built with React Native, including those that require tight integration with native APIs.

The transition is still ongoing, but the future of React Native is bridgeless, and it's incredibly bright. The next time you're building a React Native app, you can be confident that the underlying technology is more powerful and performant than ever before.

Source