In a real app
In a project, a Turbo Module shows up as a codegenConfig key in its package.json (with type: "modules" and a jsSrcsDir) and a spec file whose name starts with Native, for example specs/NativeLocalStorage.ts. On iOS the class is a .mm file adopting the generated protocol; on Android it extends the generated abstract class and is registered in a BaseReactPackage. Codegen runs on every build (a Gradle task on Android, a script phase during pod install on iOS), so a spec that does not compile breaks the native build, not the app at runtime.
The most common pitfall is getEnforcing in an optional library. If the native module is not linked (broken autolinking, a misconfigured monorepo), the app crashes on first import with an unhelpful message. get returns null and leaves room for a fallback. Types are the other one: a method returning Promise<Object> in the spec becomes an NSDictionary or a WritableMap on the native side; rich types do not cross as-is.
For a new module today the choice is between a plain Turbo Module (worth it if you have C++ to share), the Expo Modules API (Swift/Kotlin DSL, less boilerplate), and Nitro Modules (native Swift/Kotlin over JSI, fastest for chatty calls). All three sit on JSI; the React Native docs recommend Turbo Modules if you plan to write C++.
Related terms
JSI (JavaScript Interface)
The C++ API that lets JavaScript hold direct references to native objects with no serialization: the foundation of the New Architecture.
Codegen
React Native’s build-time tool that generates the native glue (C++, Java, Objective-C++) from TypeScript or Flow spec files.
New Architecture
The rewrite of React Native internals (Fabric, Turbo Modules, JSI), on by default since 0.76 and the only architecture since 0.82.
Expo Modules API
Expo’s API for writing native modules and views in Swift and Kotlin with one shared DSL, with no Objective-C or bridge boilerplate.
Nitro Modules
Margelo’s framework for writing native modules in Swift, Kotlin, or C++ exposed to JavaScript through JSI, with bindings generated from TypeScript.