React Native 0.74, Enable Bridgeless New Architecture

Overview

New version 0.74 introduces significant updates and enhancements, most notably the integration of Yoga 3.0, bridgeless architecture, and batched onLayout updates. Additionally, it increases the minimum supported Android SDK to version 23 and removes deprecated APIs including PropTypes. These changes aim to improve performance, reduce app size, and streamline development processes.

React native open source has released the bridgeless architecture in this 0.74 version.

By default bridgeless architecture is disabled, You need to enable it manually

How to enable it?

Android

For new apps:

Set the newArchEnabled property to true by either:

  • Changing the corresponding line in android/gradle.properties
  • Setting the environment variable ORG_GRADLE_PROJECT_newArchEnabled=true

For existing apps:

You will only need to update your android/gradle.properties file as follows:

  • newArchEnabled=true

iOS

For new apps:

Navigate to the ios directory and run the following:

bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install

For existing apps:

Navigate to the ios directory and run the following: You'll need to reinstall your pods by running pod install with the right flag:

RCT_NEW_ARCH_ENABLED=1 bundle exec pod install

To confirm that it's enabled: Run your Android/iOS application and see that {fabric: true} in the metro logs.

new-arch-enabled.png

Tada ๐ŸŽ‰ Now your application is running on the new bridgeless architecture ๐Ÿ“ฑ

To learn more about what this new version has click here

0
Subscribe to my newsletter

Read articles from Gayathri Perumal directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Gayathri Perumal
Gayathri Perumal

I am a self taught dev with a computer science degree. I have 4+ years of experience in working with React Native and Front end. At Hashnode to share my knowledge.