Skip to the workspace
Pebellslearn by building
Environment Setup  ›  Lesson

Expo and the React Native CLI

Expo 12 minExpo is the recommended way to start a React Native app, and development builds remove most of its old limits; the bare Community CLI suits projects that need full native control.

react native / Expo and the React Native CLI

Explore each scene at your own pace.

01 · The rule

The rule

Expo and the React Native CLI

Sprout needs a project folder before it needs a single screen. There are two ways to create one, and they sound like rivals: Expo and the React Native Community CLI. Choosing well on day one saves a week of setup pain.

The rule

Start with Expo; reach for the bare CLI only for a proven need.

Expo is a framework and set of tools built on top of React Native. It gives you:

  • a project generator (npx create-expo-app@latest),
  • a development server and a phone app, Expo Go, that runs your project by scanning a QR code,
  • ready-made libraries such as expo-camera, expo-notifications and expo-image,
  • cloud build and update services (EAS) so you can produce store builds without a Mac for iOS.

The React Native documentation itself recommends starting new apps with a framework like Expo.

The React Native Community CLI creates a "bare" project with the ios/ and android/ folders checked in:

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

With it, you install Xcode and Android Studio yourself, manage native build files by hand, and have full control over every native setting. Teams that are adding React Native to an existing native app often need that control.

The tradeoffs of Expo used to be large; today they are small. Expo Go only contains the native modules Expo ships, so a library with custom native code will not run in it. The fix is a development build: your own version of the Expo Go app that includes the extra native code. You keep Expo's tools and still add any native library. Expo can also generate the native folders for you with npx expo prebuild when you need to look inside them.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.