React Native Expo vs React Native CLI: Which is Right for You?

Webdevuk
3 min readJan 29, 2022

--

Laptop

If you’re looking to start building mobile apps with React Native, you may be wondering which option is best for you: React Native Expo or React Native CLI. Both have their advantages and disadvantages, and the right choice for you will depend on your specific needs and goals.

Advantages of React Native Expo:

  • No need to install Android Studio or Xcode to start building
  • Expo Go mobile application allows you to develop without Android Studio or Xcode downloaded onto your computer
  • Setting up a project is fast and easy
  • Mobile UI is easily viewed on both android and iPhone using barcode scanning
  • Multiple people can view the project while you’re working on it
  • Sharing the app is easy (via QR-code or link), you don’t have to send the whole .apk or .ipa file
  • Ejecting to ExpoKit allows you to integrate native modules that Expo doesn’t currently support
  • Expo can build .apk and .ipa files

Disadvantages of React Native Expo:

  • Integrated libraries included with Expo will create a larger bundle size
  • If you want to use: FaceDetector, ARKit, or Payments you need to eject it to ExpoKit
  • Ejected apps will require you to manage Xcode and Android Studio projects
  • Ejecting it to ExpoKit has a trade-off of features of Expo, e.g. you cannot share via QR code
  • Debugging in ExpoKit (with native modules) is a lot more complicated since it mixes two languages and different libraries (no official Expo support anymore)
  • The size of apk/ipa is huge

Advantages of React Native CLI:

  • React Native CLI doesn’t have limitations like Expo
  • CLI combines the best parts of native development with React
  • You can add native modules written in Java/Objective-C

Disadvantages of React Native CLI:

  • It requires Android Studio and XCode to run the projects
  • You can’t develop for iOS without having a mac
  • The device has to be connected via USB to use for testing
  • Fonts need to be imported manually in XCode
  • If you want to share the app you need to send the whole .apk / .ipa file
  • Does not provide JS APIs out of the box, e.g. Push-Notifications, Asset Manager, they need to be manually installed and linked with npm for example
  • Setting up a working project properly (including device configuration) is rather complicated and can take time

In conclusion, whether you choose React Native Expo or React Native CLI will depend on your specific needs and goals. React Native Expo is a great option if you want a quick and easy setup, and don’t mind sacrificing some control and customizability. On the other hand, React Native CLI offers more flexibility and control but requires more setup and technical knowledge.

Sources:

React Native documentation:

Expo documentation:

Xcode documentation:

Android Studio documentation:

https://developer.android.com/studio

--

--