React Native Best Practices

Chapter 1 · Practice 1 of 5

Start new apps with a framework such as Expo

From Project setup and upgrades

Why it matters

The React Native docs recommend building new apps with a framework, and name Expo as the example. A framework gives you navigation, access to native APIs, native dependency handling and a build pipeline from day one. Without one you end up assembling those pieces yourself and maintaining them through every upgrade.

Expo is not a toy mode any more. With development builds you can add any native library, write your own native modules and still use Expo tooling for routing, configuration and builds.

When to skip the framework

Go without one only when your app has constraints a framework does not serve, for example embedding React Native in an existing native app. Even then, you can adopt Expo modules one at a time.

NeedWith ExpoWithout a framework
RoutingFile-based routesWire up a navigation library
Native APIsExpo SDK modulesPick and maintain libraries
Builds and updatesHosted or local buildsYour own Xcode and Gradle setup

Do

  • Create new apps with npx create-expo-app@latest
  • Use development builds once you need a custom native library

Avoid

  • Rebuilding routing, config and build scripts by hand for a typical app

Example

Shell
npx create-expo-app@latest my-app
cd my-app
npx expo start