Guide
Enabling React Native New Architecture (TurboModules and Fabric) Step‑by‑Step
Step‑by‑step guide to enable TurboModules and Fabric in a React Native project, including gradle and pod configuration, Codegen usage, verification, and rollback.
Published by Tasadduq Burney
26 Jul 2026, 07:15 UTC
3 min125.9K views0

Desired outcome
You will have a React Native project that uses the New Architecture: TurboModules for lazy‑loaded native modules and Fabric for synchronous UI rendering. The legacy asynchronous Bridge is bypassed, and JSI‑based calls are active.
Prerequisites
- React Native version 0.68 or newer (0.71+ recommended for better stability).
- Android Studio with Gradle 7.x or later installed.
- CocoaPods 1.11+ and Xcode 14+ for iOS builds.
- A working React Native project that you can rebuild from scratch.
- Basic familiarity with editing
gradle.properties,Podfile, and running Gradle or pod commands.
Procedure
- Enable the New Architecture flag
- Open
android/gradle.propertiesin your project. - Add or set the property:
newArchEnabled=true - Save the file. This tells the Gradle plugin to build TurboModules and Fabric for Android.
- Open
- Configure iOS pods
- Open
ios/Podfile. - Inside the
install! 'cocoapods'block, set the flag:install! 'cocoapods', :disable_input_output_paths => true - Then, ensure the
RCT_NEW_ARCH_ENABLEDflag is passed:pod 'React', :path => '../node_modules/react-native' pod 'React-Core', :path => '../node_modules/react-native' pod 'React-Codegen', :path => '../node_modules/react-native' pod 'React-RCTFabric', :path => '../node_modules/react-native' pod 'React-RCTTurboModule', :path => '../node_modules/react-native' pod 'React-JSI', :path => '../node_modules/react-native' pod 'ReactCommon/turbomodule/core', :path => '../node_modules/react-native' pod 'ReactCommon/fabric', :path => '../node_modules/react-native' - At the top of the file, add:
(only if you use Firebase; otherwise skip).$RNFirebaseAsStaticFramework = true - Run:
cd ios && pod install --repo-update
- Open
- Generate C++ interfaces with Codegen
- Ensure you have TypeScript (or Flow) definitions for the native modules you want to expose. For example, a simple module
NativeGreeting.ts: - Run the Codegen script from the React Native CLI:
npx react-native-codegen --jsPath ./src --outDir ./ios/Generated --schemaDir ./schema --language typescript - Verify that
ios/Generatednow containsNativeGreeting-specs.handNativeGreeting-module.cppfiles.
// NativeGreeting.ts import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport'; import { TurboModuleRegistry } from 'react-native'; export interface Spec extends TurboModule { + greet(name: string): string; } export default TurboModuleRegistry.getEnforcing('NativeGreeting'); - Ensure you have TypeScript (or Flow) definitions for the native modules you want to expose. For example, a simple module
- Implement the native side (Android example)
- Create
src/main/java/com/yourapp/NativeGreetingModule.javathat extendsReactContextBaseJavaModuleand implements the generated spec interface: - Register the module in
MainApplication.javainside thegetPackages()method:
package com.yourapp; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.yourapp.generated.NativeGreetingModule; // generated spec public class NativeGreetingModule extends ReactContextBaseJavaModule implements NativeGreetingModule { public NativeGreetingModule(ReactApplicationContext ctx) { super(ctx); } @Override public String getName() { return "NativeGreeting"; } @ReactMethod @Override public String greet(String name) { return "Hello, " + name + "!"; } }new NativeGreetingPackage() - Create
- Build and run the app
- Android:
./gradlew assembleDebug(or run from Android Studio). - iOS:
npx react-native run-ios(ensure you opened the.xcworkspace).
- Android:
Expected checks
- During app startup, look at the native log (Logcat for Android, Xcode console for iOS). You should see a line similar to:
- Android:
ReactNativeHost: Fabric is enabled - iOS:
[RCTFabric] Fabric is enabled - Verify that a call to your module is synchronous: measure the time between invoking
NativeGreeting.greet('World')and receiving the result; it should be sub‑millisecond on a debug build (no bridge round‑trip). - Inspect the build folder:
android/app/build/generated/source/codegenandios/Generatedcontain the C++ files produced by Codegen.
Recovery options
If the app fails to start or crashes:
- Disable the New Architecture temporarily by setting
newArchEnabled=falseingradle.propertiesand removing theRCT_NEW_ARCH_ENABLEDflag from the Podfile, then runpod installagain. - Clean Gradle caches:
./gradlew cleanBuildCacheand./gradlew clean. - For iOS, delete
ios/Podsandios/Podfile.lockand repeatpod install. - Check third‑party library compatibility: libraries that still depend on the old Bridge must be updated to versions that support TurboModules/Fabric or be replaced.
Limitations
- Build times increase because of the C++ compilation step; expect a 20‑40% longer incremental build on CI.
- Not all native modules in the ecosystem have been migrated; you may encounter runtime errors if a library attempts to use the old Bridge.
- Debugging native crashes requires familiarity with C++ stack traces; consider enabling
firebase-crashlyticsor similar for symbolication.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.