Expo & React Native
Build and ship iOS/Android apps with Expo - Router navigation, EAS Build, OTA updates, native modules, and device APIs without native code.
skill: Expo & React Native category: Mobile Development tags: [Expo, React Native, Mobile, iOS, Android] readingTime: 6
Expo is the best starting point for new React Native apps - it handles the build pipeline, native config, and OTA updates so you can focus on the app. Only eject to bare workflow when you need a native module that Expo SDK doesn't support.
Workflow
- Set up a new Expo project with Expo RouterExpo Router brings file-system routing to React Native - the same mental model as Next.js, with deep linking out of the box.
- Use Expo SDK APIs for native featuresExpo SDK wraps 50+ native APIs - camera, location, notifications, haptics - without writing Swift or Kotlin.
- Build for stores with EAS BuildEAS Build is Expo's cloud build service - creates signed app binaries without needing Xcode locally.
- Push OTA updates without app store reviewOTA updates push JavaScript changes directly to users' devices - bug fixes without the 24-48 hour review wait.
- Configure native features with app.json pluginsExpo's config plugins modify native Xcode/Gradle projects declaratively - no native project files to manually edit.
Output Format
Expo app: Expo Router for navigation, SDK APIs for native features, EAS Build for store binaries, OTA updates, and config plugins for native permissions.
app/
_layout.tsx # root Stack/Tabs layout
index.tsx # home screen
[id].tsx # dynamic route
eas.json # build profiles
app.json # plugins, permissions, store configExamples
Input
Output
Edge Cases & Gotchas
- Managed vs Bare workflow - Managed workflow (Expo Go): easiest, limited to Expo SDK. Bare workflow: ejected to native projects - full native access but requires Xcode/Android Studio.
- OTA update limits - OTA updates can only change JavaScript - native code changes (new permissions, native modules) always require a new store submission.
- Development builds vs Expo Go - Expo Go has a fixed SDK and can't use custom native modules. Development builds are custom Expo Go-like apps that include your native modules.
- New Architecture - React Native's New Architecture (JSI, Fabric) is opt-in as of 2024. Test your Expo SDK version's compatibility before enabling it in production.
When to Break These Rules
- Use bare React Native without Expo when you need deep native customization not achievable with config plugins - but only after exhausting Expo's capabilities.
- Use Flutter instead of Expo when your team has no React background and cross-platform performance is the top priority.
Reference Files
https://docs.expo.dev/https://docs.expo.dev/eas/