Part 15 · Further improvements

Choose the module boundary and ownership model

Prerequisites: 11-module-queues, 12-platform-lifecycle

Decision map

A practical decision aid, not an exclusive taxonomy; mixed designs are common. Nodes: Need native API, Visual surface?, Swift / Kotlin?, C++ or Codegen?.
A practical decision aid, not an exclusive taxonomy; mixed designs are common. [S09] [S10] [S11] [S13]

Baseline synthesis

List each native capability as a synchronous query, asynchronous operation, stream or view. Identify payload size, required thread, resource owner and platform-specific failure paths.

[S09] [S11] [S12]

Choice verified

Use Expo Modules for concise Swift/Kotlin modules and lifecycle/type conversion helpers; use TurboModules for RN Codegen or direct C++ needs; use a Fabric/Expo native View for visual surfaces. SharedObject can expose long-lived native instances where appropriate.

[S10] [S11] [S13]

Trade-off synthesis

Every abstraction carries dependency and API-shape choices. Direct JSI maximizes control but makes thread, conversion and lifetime responsibilities more explicit. Benchmark only after a concrete bottleneck appears.

[S04] [S11] [S13]

Validation synthesis

Build both platforms, exercise cancellation and lifecycle, measure repeated call/event flows, and ensure native resources release when no JS/native reference remains.

[S12] [S13]
Keep this: Pick the smallest public API that expresses required behavior, then select a module mechanism.
Check yourself: When is a SharedObject useful?

When a long-lived native instance such as a decoder or database context should be referenced from JS without repeatedly recreating it.

Sources & further reading

  1. [S04] About the New Architecture

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

    Supports: JSI references, module and renderer interoperability, limits of performance claims.

    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. [S10] Fabric Native Components Introduction

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

    Supports: Typed props and events for custom host components.

    Inspect the implementation boundary described by this source.

  4. [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.

  5. [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.

  6. [S13] Using shared objects

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

    Supports: Long-lived native instances, JS references and deallocation.

    Inspect the implementation boundary described by this source.