~/swaraj.dev
Back to all posts
May 31, 20261 min read

TurboModules: Boost Native Performance Without a Full Rewrite

Learn how React Native's TurboModules let you add native speed to hot code paths without refactoring your whole app.

react nativeturbo modulesperformance

Insight

React Native’s new architecture introduces TurboModules, a thin C++ bridge that lets you expose native code with near‑zero overhead. A common myth is that you must rewrite large parts of your app to benefit; in reality you can incrementally replace performance‑critical functions. TurboModules are lazy‑loaded, type‑safe, and work seamlessly with TypeScript, so you get native speed where it matters most while keeping the rest of your JavaScript unchanged.

Example

// src/native/DeviceInfoModule.ts
import { TurboModuleRegistry } from 'react-native';

export interface DeviceInfoSpec extends TurboModule {
  getBatteryLevel(): Promise<number>;
}

export default (TurboModuleRegistry.getEnforcing<
  DeviceInfoSpec>('DeviceInfo') as DeviceInfoSpec);

In Java/Kotlin you’d implement DeviceInfo and register it. The JS side now calls await DeviceInfo.getBatteryLevel() with virtually no bridge cost.

Takeaway

Start by profiling hot paths, then replace only those calls with TurboModules. You get native‑level latency without a massive code migration, and the rest of your app stays pure JavaScript.