Beginner-Friendly Topic
Take your time - it's perfectly normal to re-read this topic 2-3 times. Try the interactive code editor below to run code yourself. Use the Q&A section to check your understanding before moving on.You've got this!
Lesson 2 of 10
Expo vs React Native CLI - Making the Right Choice
The single most common question from beginners is 'Expo or CLI?' The answer depends on your app's requirements. Understand the tradeoffs so you never pick the wrong one.
Expo - Managed vs Bare Workflow
- **Expo Managed**: no Xcode or Android Studio needed to start; `npx create-expo-app MyApp`, run with Expo Go app on your phone. Covers ~95% of app needs via Expo SDK
- **Expo Bare**: eject from managed to bare when you need custom native modules not in the Expo SDK; you still keep all Expo SDK libraries but own the native code
- **EAS (Expo Application Services)**: cloud build service - build .ipa and .apk in CI without owning a Mac. Critical for Windows/Linux developers targeting iOS
- Expo SDK libraries all support New Architecture and are the Gold Standard for permissions, camera, location, notifications, file system, etc.
- OTA (Over-the-Air) updates via `expo-updates` - push JS-only fixes to production users without going through store review
React Native CLI - When to Use It
- Use CLI when you need deeply custom native code that doesn't fit the Expo module system
- When integrating with existing native iOS/Android codebases (brownfield development)
- When using Kotlin/Swift native modules written by your own team
- CLI gives you full ownership of `android/` and `ios/` directories
- Higher setup cost: requires Android Studio + JDK for Android; Xcode for iOS
Project Initialization
# ---- Expo (recommended for most apps) ----
npx create-expo-app@latest MyApp --template blank-typescript
cd MyApp
npx expo start # starts Metro + shows QR code
npx expo run:android # builds and installs on connected device/emulator
npx expo run:ios # macOS only
# ---- React Native CLI ----
npx @react-native-community/cli@latest init MyApp --template react-native-template-typescript
cd MyApp
npx react-native run-android
npx react-native run-ios
# Check your environment
npx react-native doctor # works for both Expo and CLI projectsTip
Tip
Practice Expo vs React Native CLI Making the Right Choice in small, isolated examples before integrating into larger projects. Breaking concepts into small experiments builds genuine understanding faster than reading alone.
Comparing Expo Managed Workflow with Prebuild vs Bare React Native CLI
Practice Task
Note
Practice Task - (1) Write a working example of Expo vs React Native CLI Making the Right Choice from scratch without looking at notes. (2) Modify it to handle an edge case (empty input, null value, or error state). (3) Share your solution in the Priygop community for feedback.
Quick Quiz
Common Mistake
Warning
A common mistake with Expo vs React Native CLI Making the Right Choice is skipping edge case testing - empty inputs, null values, and unexpected data types. Always validate boundary conditions to write robust, production-ready react native code.
Key Takeaways
- The single most common question from beginners is 'Expo or CLI.
- *Expo Managed**: no Xcode or Android Studio needed to start; `npx create-expo-app MyApp`, run with Expo Go app on your phone. Covers ~95% of app needs via Expo SDK
- *Expo Bare**: eject from managed to bare when you need custom native modules not in the Expo SDK; you still keep all Expo SDK libraries but own the native code
- *EAS (Expo Application Services)**: cloud build service - build .ipa and .apk in CI without owning a Mac. Critical for Windows/Linux developers targeting iOS
Finished this lesson?