Learn about React Native's "New Architecture" and how and why to migrate to it.
We recommend using SDK 51 or later 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.
To learn more about the ideas and motivations behind the New Architecture, we recommend the following resources:
A starting point for exploring the various topics related to the New Architecture.
A high level overview of the motivations behind the New Architecture.
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, such as react-native-bootsplash
, react-native-fbsdk-next
, and react-native-pdf
, are tracked in the "New Architecture support in popular libraries" spreadsheet. This does not track every library, only those that appeared in the top 400 most installed libraries on EAS Build, so if a library is not there it does not mean it is necessarily unsupported.
In React Native 0.74, there are various Interop Layers enabled by default which allows many libraries to work without any changes — however, it's 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.
Learn more about known issues.
The easiest way to get started with the New Architecture is to use the with-new-arch
template when creating a new project:
-
npx create-expo-app@latest -e with-new-arch
You can enable the New Architecture in your app using the expo-build-properties
config plugin:
1
Install expo-build-properties
:
-
npx expo install expo-build-properties
2
Set newArchEnabled
on target platforms:
{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"ios": {
"newArchEnabled": true
},
"android": {
"newArchEnabled": true
}
}
]
]
}
}
3
Run prebuild command and compile your project:
-
npx expo prebuild --clean
-
npx expo run:android
-
eas build -p android
-
npx expo prebuild --clean
-
npx expo run:ios
-
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.
If you use Expo Router or React Navigation, your app may be impacted by a known issue withuseLayoutEffect
in React Native with the New Architecture. This issue is expected to be resolved in a patch release for React Native 0.74.
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.
Yes! You can try the New Architecture in your app even if some of the libraries you use aren't supported. 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.
We'd also love it if you could report your experience, so we can learn how developers like you are getting on and help you out where possible.
While there are likely incompatibilities we are not aware of, the following are the known issues with the New Architecture in the Expo SDK:
preventAutoHideAsync()
does not prevent hiding the splash screen. This will be fixed in React Native 0.74.1.Refer to the reactwg/react-native-new-architecture/discussions#167 for general information, and the issues on any specific libraries you use for more details. The following is a summary of issues and, when available, workarounds for some popular libraries that Expo has tracked:
@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.Create a minimal reproducible example and report the issue to the library author, if applicable, or to the React Native team.