# Expo or the React Native CLI — React Native

Source: https://www.skillbyai.com/en/react-native/f-expo

> Choosing how to start.

## Framework versus bare setup

The React Native documentation recommends starting with a framework, and **Expo** is the main one. Expo provides a project template, a large set of maintained native modules (`expo-camera`, `expo-location` and more), file-based routing with Expo Router, **development builds**, and cloud services (EAS) for building and updating apps. **Continuous Native Generation** (prebuild) generates the `ios` and `android` folders from `app.json` and config plugins, so you rarely edit native projects by hand. The bare **React Native Community CLI** gives you the native folders directly and full manual control, at the cost of more setup and maintenance. You can still write custom native code in an Expo project.

## Creating and running a project

Commands from the Expo docs; check the docs for your version.

```bash
# create a new Expo project (TypeScript template with Expo Router)
npx create-expo-app@latest my-app
cd my-app

# start the Metro bundler and dev server
npx expo start
# then press i (iOS simulator), a (Android emulator),
# or scan the QR code with Expo Go / a development build

# when you need custom native code: build a development build
npx expo run:ios
npx expo run:android
```

## Expo Go is for learning

Expo Go is a prebuilt sandbox app with a fixed set of native modules. Real projects usually move to a development build, which includes exactly the native libraries your app uses.

**Quiz:** What does Expo prebuild (Continuous Native Generation) do?

- [x] Generates the native ios and android projects from app config and config plugins
- [ ] Compiles JavaScript into Swift
- [ ] Uploads the app to the stores
- [ ] Removes the need for a JavaScript engine

*Answer:* Generates the native ios and android projects from app config and config plugins. Native folders become generated output.
