Skip to content

React Native team recommends using a framework like Expo

updated

The React Native team has published a blog post explaining updated guidance first shared at React Conf: using a React Native framework, such as Expo, is now the recommended approach for creating new apps.

What a framework provides

The post describes a React Native framework as a toolbox with the APIs needed to build production-ready apps. It points to common problems that apps face, such as navigating between screens, fetching data and storing user state, along with native-specific concerns like upgrading native code between React Native versions, managing compatible dependency versions and handling native build tools.

According to the team, developers are either using a framework or building their own. Building a custom framework is described as a valid choice, and the post notes that companies like Meta and Microsoft do so internally to integrate with their brownfield apps. The team says it believes most people will be better off using an existing framework, and compares the idea to production-grade React frameworks on the web.

As of today, Expo is the only recommended community framework for React Native. The post states that Expo, the framework, is and will remain free and open source, while Expo Application Services (EAS) is an optional paid service. The Getting Started page on the React Native website has been updated to reflect the recommendation, and the post links to a talk by Kadi @ Expo showcasing what Expo can do in 2024.

Impact on existing projects

  • Projects already using Expo require no changes.
  • Instructions for migrating an existing app to Expo are available on the official Expo website.
  • Using React Native without an official framework will continue to be supported, and tools such as React Native Community CLI, Template and Upgrade Helper will keep working as usual.

The react-native init command has moved out of core and is now available via:

npx @react-native-community/cli@latest init

It is also on GitHub at react-native-community/cli.

For library developers, the team has collected recommendations on which APIs to use in the RFC.

RFC0759

The reasoning behind the change is detailed in RFC0759: React Native Frameworks, which the post describes as the result of a multi-month effort involving partners across the React Native ecosystem. The RFC also includes guidelines on how other frameworks can become recommended, as the team hopes to see more competition and innovation. The RFC and related changes were also presented in the talk useFrameworks() at App.js 2024.

Source: reactnative.dev