Edit this page
Learn about React Native's "New Architecture" and how and why to migrate to it.
We recommend using SDK 52 or newer for the best experience with the New Architecture.
The New Architecture is a name that we use to describe a complete refactoring of the internals of React Native. It is also used to solve limitations of the original React Native architecture discovered over years of usage in production at Meta and other companies.
In this guide, we'll talk about how to use the New Architecture in Expo projects today.
A blog post from the React Native team at Meta that gives an overview of the features of the New Architecture and the motivations behind building it.
The New Architecture is the future of React Native — yet, for many apps, there may not be many immediate benefits to migrating today. You may want to think of migrating to the New Architecture as an investment in the future of your app, rather than as a way to immediately improve your app.
The changes that come with the New Architecture address the technical debt of the original implementation and unlock possibilities for solving long-standing issues in React Native, such as interoperability with synchronous native APIs (for example, UITableView
), and pave the way for concurrent React support.
As of SDK 51, nearly all expo-*
packages in the Expo SDK support the New Architecture (including bridgeless). Learn more about known issues.
Additionally, all modules written using the Expo Modules API support the New Architecture by default! So if you have built your own native modules using this API, no additional work is needed to use them with the New Architecture.
The compatibility status of many of the most popular libraries is tracked on React Native Directory (learn more about known issues in third-party libraries). We've built tooling into Expo Doctor to integrate with React Native Directory to help you validate your dependencies, so you can quickly learn which libraries are unmaintained and which incompatible or untested with the New Architecture.
Run npx expo-doctor
to check your dependencies against the data in React Native Directory.
-
npx expo-doctor@latest
You can configure the React Native Directory check in your package.json file. For example, if you would like to exclude a package from validation:
{
"expo": {
"doctor": {
"reactNativeDirectoryCheck": {
"exclude": ["react-redux"]
}
}
}
}
true
, the check will warn if any packages are missing from React Native Directory. Set this to false
to disable this behavior. On SDK 52 and above, this is set to true
by default, otherwise it is false
by default. You can also override this setting with the EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK
environment variable (0 is false
, 1 is true
).["exact-package", "/or-a-regex-.*/"]
.As of SDK 52, all new projects will be initialized with the New Architecture enabled by default.
-
npx create-expo-app@latest
1
Set newArchEnabled
on target platforms:
To enable it on both Android and iOS, use the newArchEnabled
at the root of the expo
object in your app config. You can selectively enable it for a single platform by setting, for example, "android": { "newArchEnabled": true }
.
{
"expo": {
"newArchEnabled": true
}
}
To enable it, you need to install the expo-build-properties
plugin and set newArchEnabled
on target platforms.
{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"android": {
"newArchEnabled": true
},
"ios": {
"newArchEnabled": true
}
}
]
]
}
}
2
Create a new build.
# Run a clean prebuild and start a local build, if you like
-
npx expo prebuild --clean && npx expo run:android
# Run a build with EAS if you prefer
-
eas build -p android
# Run a clean prebuild and start a local build, if you like
-
npx expo prebuild --clean && npx expo run:ios
# Run a build with EAS if you prefer
-
eas build -p ios
If the build succeeds, you will now be running your app with the New Architecture! Depending on the native modules you use, your app may work properly immediately.
Now you can tap around your app and test it out. For most non-trivial apps, you're likely to encounter some issues, such as missing native views that haven't been implemented for the New Architecture yet. Many of the issues you encounter are actionable and can be resolved with some configuration or code changes. We recommend reading Troubleshooting sections below for more information.
newArchEnabled=true
in the gradle.properties file.npx create-expo-app
or npx expo prebuild
), you can enable the New Architecture by setting the newArchEnabled
property to "true"
in the Podfile.properties.json file. Otherwise, refer to the "Enable the New Architecture for Apps" section of the React Native New Architecture working group.Meta and Expo are working towards making the New Architecture the default for all new apps and ensuring it is as easy as possible to migrate existing apps. However, the New Architecture isn't just a name — many of the internals of React Native has been re-architected and rebuilt from the ground up. As a result, you may encounter issues when enabling the New Architecture in your app. The following is some advice for troubleshooting these issues.
You may be able to try the New Architecture in your app even if some of the libraries you use aren't supported, but it will require temporarily removing those libraries. Create a new branch in your repository and remove any of the libraries that aren't compatible until your app is running. This will give you a good idea of what libraries still need work before you can fully migrate to the New Architecture. We recommend creating issues or pull requests on those libraries' repositories to help them become compatible with the New Architecture. Alternatively, you could switch to other libraries that are compatible with the New Architecture. Refer to React Native Directory to find compatible libraries.
As of SDK 52, the following are the known issues with the New Architecture in the Expo SDK:
You may encounter other issues in older SDK releases. We recommend upgrading to the latest SDK version.
Since React Native 0.74, there are various Interop Layers enabled by default. This allows many libraries built for the old architecture to work on the New Architecture without any changes. However, the interop is not perfect and some libraries will need to be updated. The libraries that are most likely to require updates are those that ship or depend on third-party native code. Learn more about library support in the New Architecture.
Refer to React Native Directory a more complete list of libraries and their compatibility with the New Architecture. The following libraries were found to be popular among Expo apps and are known to be incompatible:
@react-native-masked-view/masked-view
instead.@react-native-clipboard/clipboard
instead.react-native-blob-util
instead.expo-file-system
or a fork of react-native-fs instead.expo-location
instead.react-native-date-picker
or @react-native-community/datetimepicker
instead.This isn't entirely surprising! Not all libraries are compatible yet, and in some cases compatibility was only recently added and so you will want to ensure you update your libraries to their latest versions. Read the logs to determine which library is incompatible. Also, run npx expo-doctor@latest
to check your dependencies against the data in React Native Directory.
When you are using the latest version of a library and it is not compatible, report any issues you encounter to the respective GitHub repository. Create a minimal reproducible example and report the issue to the library author. If you believe the issue originates in React Native itself, rather than a library, report it to the React Native team (again, with a minimal reproducible example).