Setup with Expo & Project Structure
Two ways to start: Expo vs bare React Native
There are two paths to a React Native project:
- Expo — a toolkit and platform on top of React Native that handles the hard setup (build tools, native config) for you. Strongly recommended for beginners and most apps.
- Bare React Native CLI — full control and direct native access, but you manage Xcode/Android Studio setup yourself. Choose this only when you need custom native code Expo doesn’t support.
Creating an Expo app
npx create-expo-app@latest my-app
cd my-app
npx expo start
This starts a development server and shows a QR code. Install the free Expo Go app on your phone, scan the code, and your app runs instantly on a real device — no Xcode or Android Studio needed to begin.
Why Expo is great for learning
- No native toolchain setup to fight with on day one.
- Test on a real phone in seconds via Expo Go.
- Built-in APIs for camera, location, notifications and more.
- Easy cloud builds (EAS) when you’re ready to ship.
The project structure
App.js(or theapp/folder with Expo Router) — your entry point / screens.package.json— lists your dependencies and scripts.node_modules/— installed libraries (never edit; never commit).assets/— images, fonts, the app icon and splash screen.app.json— Expo configuration (app name, icon, permissions).
Installing libraries
npm install axios # any npm package
npx expo install expo-camera # Expo-aware install (picks compatible versions)
Use npx expo install for native modules so Expo picks versions compatible with your SDK; use plain npm install for pure-JavaScript libraries.
TypeScript from day one
create-expo-app supports TypeScript out of the box. Using it catches mistakes as you type and gives great autocomplete — highly recommended even for beginners.
Common mistakes
- Editing files in
node_modules(your changes get wiped on reinstall). - Using
npm installfor native modules instead ofnpx expo install. - Committing
node_modulesto git (it’s huge; it’s rebuilt from package.json).
Summary: Start with Expo (create-expo-app+ Expo Go) for the smoothest beginning. Your code lives inApp.js/app/, dependencies inpackage.json, and you install native modules withnpx expo install.