WhoBuilt

React Native New Architecture

Oct 25, 2022· 1 h 14 min· 16K views·Watch on YouTube

Speaker

Nicola Corti, an Android engineer on Meta’s React Native team, joins the React Native Show podcast hosted by Mukash to explain React Native’s New Architecture and its migration path.

Why React Native needs a new architecture

Corti says the New Architecture began about four years earlier because the old architecture and its bridge limited performance goals and concurrent features. Rolling it out inside Meta took around three years, much longer than the initial six-month estimate, because highly optimized app surfaces exposed many edge cases.

The architecture’s main parts

The main components are Fabric, the new renderer; Turbo Modules, the updated native module system; and Codegen, which generates platform-specific code from API specifications. Codegen is optional and accepts Flow, JavaScript, or TypeScript specs. Bridgeless Mode was also discussed, but at the time of recording it was not ready as a documented migration option.

What migration enables

Fabric is designed to support React 18 concurrent features such as startTransition, which do not work as intended on the old renderer. Corti stresses that migration is not primarily a performance upgrade: it enables future APIs, unifies Android and iOS implementations in C++, and can improve type safety through Codegen. He also says developers should keep React Native current to avoid accumulating upgrade work.

Languages and adoption tradeoffs

Corti describes Codegen’s role in keeping JavaScript, platform code, and C++ layers aligned, while noting that its supported types cover common use cases rather than every complex TypeScript pattern. Kotlin can be used with either architecture, and the React Native documentation was being updated with Kotlin examples. Swift interoperability with C++ remained more difficult, while C++ build time was an active developer-experience concern.

Migration path and near-term work

Turbo Modules can be adopted gradually because legacy native modules can continue to work, but Fabric migration is more complicated and may be effectively all at once for apps with a single surface. Corti encourages teams to start migration while the working group is actively collecting feedback and addressing pain points. For React Native 0.70, he highlights Android autolinking for New Architecture libraries and end-to-end CMake support.

Takeaways

  • Treat the New Architecture as access to future React and React Native capabilities, not as a guaranteed immediate speedup.
  • Inventory native libraries early: Turbo Modules support a gradual path, while Fabric compatibility can determine whether a surface renders correctly.
  • Use Codegen where its supported types fit to catch mismatches between JavaScript and native layers.
  • Keep React Native upgrades frequent enough that migration issues remain manageable.
  • Share migration blockers with the New Architecture Working Group while the team is actively gathering feedback.

Mentioned in this talk

Search inside this talk

What was claimed 12

  • uses
    “we've been testing the rollout of them within our own apps, including the flagship Facebook app.”
    0:20inThe New React Native: Bringing the Fabric renderer to the “Facebook” appYouTube
    Verified8 sources· Talk
  • role at
    Nicola Corti is focused on open-source React Native at Meta
    “I work as an Honor Engineer on the React Native team at Meta”
    0:24inAll devs make mistakes, even at MetaYouTube
    Verified6 sources· Talk
  • feature
    code generation: Generates platform-specific code from API specifications and helps ensure type safety across layers
    “How can we generate platform-specific code from a specification of your API?”
    YouTube
    Unverified1 source· Talk
  • feature
    Fabric: enables use of concurrent React features such as startTransition through Fabric
    enables use of concurrent React features such as startTransition through Fabric
    “Anything concurrent in React works only with the new renderer.”
    YouTube
    Unverified2 sources· Talk
  • feature
    Fabric: Opens access to new APIs and capabilities; it was not designed primarily as a performance boost
    “The new architecture was never intended to be a performance boost. It’s essentially designed to open the door to new APIs and capabilities”
    YouTube
    Unverified1 source· Talk
  • feature
    Fabric: uses a shared C++ implementation for the renderer and native module system across platforms
    uses a shared C++ implementation for the renderer and native module system across platforms
    “Both the new renderer and the new native module system are implemented under the hood in C++.”
    YouTube
    Unverified1 source· Talk
  • feature
    code generation: accepts TypeScript definitions as input
    accepts TypeScript definitions as input
    “Nowadays, you can give the codegen either a TypeScript, JavaScript, or Flow spec.”
    YouTube
    Unverified1 source· Talk
  • feature
    Bridgeless: will allow the Bridge to be removed and avoid initializing it, improving startup performance
    will allow the Bridge to be removed and avoid initializing it, improving startup performance
    “There will be startup performance improvements because we won't need to initialize the bridge”
    YouTube
    Unverified1 source· Talk
  • feature
    TurboModules: Supports gradual migration, with legacy native modules continuing to work in legacy mode
    “Turbo Modules are fully backward compatible”
    YouTube
    Unverified1 source· Talk
  • feature
    React Native: 0.70 adds Android autolinking support for New Architecture libraries
    “autolinking support for Android with New Architecture libraries”
    YouTube
    Unverified1 source· Talk
  • metric
    React Native: 0.70 was expected to be released around the podcast's publication
    “I think by then maybe 0.70 will be released.”
    YouTube
    Unverified1 source· Talk
  • feature
    React Native: 0.70 adds end-to-end CMake support
    0.70 adds end-to-end CMake support
    “Another thing coming in 0.70 is related: CMake support end to end.”
    YouTube
    Unverified1 source· Talk

Related talks