Why Expo? Setup and Your First App
Expo is a framework and set of tools built on top of React Native that makes building mobile apps with React dramatically simpler: no need to install Xcode or Android Studio to get started, a huge library of pre-built native modules (camera, location, notifications...), and a companion app (Expo Go) that runs your app on a real phone instantly, no cables required.
Bare React Native vs. Expo
| Bare React Native | Expo | |
|---|---|---|
| Native project setup | Manual (Xcode/Android Studio) | Handled for you |
| Native modules | Install & link manually | Huge built-in library (expo-camera, expo-location, ...) |
| Running on a device | Cable + native build | Scan a QR code with Expo Go |
| Ejecting to bare native code | N/A | Possible any time (expo prebuild) |
Expo isn't a separate language, you're still writing React and JavaScript/TypeScript, just with a much smoother toolchain around it.
Creating your first app
npx create-expo-app my-app
cd my-app
npx expo start
npx expo start boots a development server and shows a QR code, scan it with the Expo Go app (iOS/Android) to run your app on a real device, or press i/a in the terminal to launch an iOS/Android simulator if you have one installed.
Project structure
my-app/
app/ # every file here is a screen (file-based routing, next lesson)
index.tsx
_layout.tsx
assets/ # images, fonts
app.json # app name, icon, splash screen, permissions
package.json
NOTE
Expo apps are still "just React", the core differences from web React are which components you use (<View> instead of <div>, <Text> instead of a raw string) and that there's no browser DOM underneath, everything renders to native platform views.