For most of React Native's life, JavaScript and native code could not call each other. They could only post messages. Every call was serialised to JSON, put on a queue, batched, and delivered asynchronously to the other side, with the answer coming back the same way. That queue was called the bridge, and three consequences followed from it. Everything was asynchronous, even reading a value the native side already had. Everything had to be JSON, so you could not pass a function, an image buffer or a reference. And nothing was type-checked across the boundary, so a mismatch was a runtime crash.
JSI, the JavaScript Interface, removes the queue. It is a C++ layer that lets JavaScript hold a direct reference to a native object and call its methods synchronously, with no serialisation at all. Everything else in the New Architecture is built on it.
TurboModules are native modules over JSI. Beyond being faster, they are lazily loaded: the old system initialised every registered module at startup whether the app used it or not, which is why startup time grew with every dependency. A TurboModule is created the first time it is used.
Fabric is the rewritten renderer. Because it can read layout synchronously through JSI, it can render on either thread, and it supports concurrent React features properly. Codegen ties it together by generating the C++ interfaces from your TypeScript, so a mismatch between the two sides is a build error rather than a crash on a user's phone.
// The old way: everything across the bridge was async, even a value the
// native side already had sitting in memory.
//
// const width = await NativeModules.ScreenInfo.getWidth(); // a frame later
// With a TurboModule over JSI, the same read is just a read.
import { TurboModuleRegistry, type TurboModule } from 'react-native';
export interface Spec extends TurboModule {
// Codegen reads THIS and generates the C++ on both sides, so a mismatch
// is a build error rather than a crash on somebody's phone.
getDeviceName(): string; // synchronous - no Promise
getBatteryLevel(): number;
setBrightness(value: number): void;
readSetting(key: string): Promise<string | null>; // async when it should be
}
// Lazily created: not loaded at all until this line first runs.
export default TurboModuleRegistry.getEnforcing<Spec>('DeviceInfo');
// At the call site there is no await, no queue, and no JSON round trip.
import DeviceInfo from './NativeDeviceInfo';
export function DeviceBanner() {
const name = DeviceInfo.getDeviceName(); // returns immediately
const battery = DeviceInfo.getBatteryLevel();
return <Text>{name} - {Math.round(battery * 100)}%</Text>;
}
// Check which architecture is actually running:
// console.log(global.nativeFabricUIManager ? 'Fabric' : 'legacy renderer');
Open this example in the editor and change it. Nothing you type is saved.