Part 3 · Fundamentals

Two authoring paths over one runtime boundary

Prerequisites: Start here / basic technical literacy

Two authoring paths

The two paths share the app runtime; the drawing emphasizes authoring contracts, not a claim of identical generated glue. Nodes: JS facade, Turbo spec, Expo DSL, Android code, iOS code.
The two paths share the app runtime; the drawing emphasizes authoring contracts, not a claim of identical generated glue. [S09] [S11] [S12]

Mental model verified

Both paths expose native functionality to the same JS app. TurboModules declare a TS/Flow spec that Codegen uses for platform glue. Expo Modules declare Name, Function, AsyncFunction, Events and View through a Swift/Kotlin module definition.

[S09] [S11] [S12]

Worked example synthesis

A document scanner might expose scanAsync(): Promise<Result> through either path. The native implementation and SDK interaction remain Android and iOS code; the JS facade normalizes the result shape.

[S09] [S12]

Engineering decision synthesis

Choose RN Codegen when C++ and generated interfaces are central. Choose Expo Modules when its Swift/Kotlin DSL and lifecycle helpers fit your team and dependencies. Measure actual bottlenecks rather than assuming one method call is decisively faster.

[S08] [S11]

Failure mode and improvement synthesis

A matching method name does not guarantee the same permission, cancellation, or UI semantics. Define a cross-platform contract, then test its native branches independently.

[S12] [S15] [S17]
Keep this: TurboModules use RN typed specs and Codegen; Expo Modules use a Swift/Kotlin DSL above JSI-related primitives.
Check yourself: Does an Expo Module create a separate JS runtime?

No. It exposes native functionality into the React Native app’s JS runtime.

Sources & further reading

  1. [S08] Using Codegen

    React Native · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: Generated Android JNI/Java and iOS Objective-C++/C++ glue.

    Inspect the implementation boundary described by this source.

  2. [S09] Native Modules: Introduction

    React Native · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: Typed TurboModule specification and native implementations.

    Inspect the implementation boundary described by this source.

  3. [S11] Expo Modules API: Overview

    Expo · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: Expo Modules design and choice versus TurboModules.

    Inspect the implementation boundary described by this source.

  4. [S12] Module API Reference

    Expo · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: Function, AsyncFunction, queues, views, events and lifecycle.

    Inspect the implementation boundary described by this source.

  5. [S15] Kotlin coroutines on Android

    Android Developers · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: Async work and structured cancellation for Android.

    Inspect the implementation boundary described by this source.

  6. [S17] UIKit

    Apple Developer · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: UIKit objects are normally used from the main thread.

    Inspect the implementation boundary described by this source.