WhoBuilt

Bringing the New React Native Architecture to the OSS community

Sep 20, 2022· 28 min· 2.4K views·Watch on YouTube

Speaker

Nicola Corti, an engineer on Meta’s React Native team, explains how the team is bringing React Native’s new architecture to the open source community at React Native EU 2022.

Why the architecture changed

Corti says the new architecture removes the performance costs of sending JSON messages over the bridge and moves renderer and framework internals into shared C++ code. That shared foundation helps reduce differences between Android and iOS. It also enables Codegen to generate platform-specific boilerplate from typed module specifications.

Making the infrastructure usable

Supporting open source meant adapting build pipelines to generate code and compile C++. On Android, the team extended Gradle and introduced a React Native Gradle Plugin; on iOS, it updated and tested CocoaPods scripts. Corti says these tools aim to keep build complexity out of developers’ way while still allowing custom C++ modules.

Versions and migration updates

React Native 0.68 was the first version with a practical switch for enabling the new architecture. Version 0.69 added bundled Hermes and React 18, while 0.70 added Android autolinking for the new architecture, CMake support, and unified Codegen configuration. Corti recommends 0.70 as a starting point and previews work to simplify the app template in 0.71.

React 18 and migration resources

Corti explains that React Native 0.69 and later can use React 18, but concurrent features such as `startTransition` require the new architecture. He points developers to the official architecture and migration guides, technical overviews, a community working group, and sample repositories with step-by-step migration histories. He encourages teams to share migration problems so the community can improve the process.

Takeaways

  • Treat the new architecture as the foundation for React Native features such as concurrent React, not just a bridge replacement.
  • Use React Native 0.70 as a practical starting point for trying the new architecture, according to Corti’s 2022 guidance.
  • Codegen can turn typed module specifications into platform-specific scaffolding, reducing repeated native boilerplate.
  • Library authors can use the sample migration repositories to plan support for both old and new architectures.
  • Report migration friction and missing documentation to the React Native community to help improve the shared path.

Mentioned in this talk

Search inside this talk

What was claimed 7

  • built
    “Hermes is a new JavaScript engine built by Facebook.”
    0:16inIntroduction to Hermes EngineYouTube
    Verified3 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
    React Native: The new architecture includes Fabric, TurboModules, Codegen, and Bridgeless Mode.
    “we have a new renderer ... a new native module system ... Codegen ... Bridgeless Mode.”
    YouTube
    Unverified1 source· Talk
  • feature
    React Native: Hermes is the default JavaScript engine starting with version 0.70.
    Hermes is the default JavaScript engine starting with version 0.70.
    “From React Native 0.70 ... Hermes will be the default engine.”
    YouTube
    Unverified1 source· Talk
  • feature
    React Native: Codegen supports TypeScript specifications; support is a work in progress.
    “React Native Codegen supports TypeScript.”
    YouTube
    Unverified1 source· Talk
  • feature
    React Native: Version 0.69 is the first React Native release with React 18.
    Version 0.69 is the first React Native release with React 18.
    “React Native 0.69 is the first version ... that comes with React 18.”
    YouTube
    Unverified1 source· Talk
  • built
    Android autolinking support for the new architecture
    “This was developed by Callstack ... and is now shipped in 0.70.”
    YouTube
    Verified2 sources· Talk

Related talks

Bringing the New React Native Architecture to the OSS community, Nicola Corti · WhoBuilt