React Native CLI v/s Expo CLI

Ankit Jain
3 min readNov 9, 2020

If you are new to mobile development, the easiest way to get started is with Expo CLI. Expo is a set of tools built around React Native and, while it has many features, the most relevant feature for us right now is that it can get you writing a React Native app within minutes. You will only need a recent version of Node.js and a phone or emulator.

If you are already familiar with mobile development, you may want to use React Native CLI. It requires Xcode or Android Studio to get started. If you already have one of these tools installed, you should be able to get up and running within a few minutes. If they are not installed, you should expect to spend about an hour installing and configuring them.

Advantages and Disadvantages(React Native and Expo)

React Native

Advantages:

  • You can add native modules written in Java/Objective-C (probably the only but the strongest one)

Disadvantages:

  • Needs 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 it 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

Expo

Expo is a framework that built around react-native which helps you to start developing your app very quickly and testing of React Native app.

Source: https://expo.io/features

Advantages:

  • Setting up a project is easy and can be done in minutes
  • You (and other people) can open 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
  • No build necessary to run the app
  • Integrates some basic libraries in a standard project (Push Notifications, Asset Manager,…)
  • You can eject it to ExpoKit and integrate native code continuing using some of the Expo features, but not all of them
  • Expo can build .apk and .ipa files (distribution to stores possible with Expo)

Disadvantages:

  • You can’t add native modules (probably a game-changer for some)
  • You can’t use libraries that use native code in Objective-C/Java
  • The standard Hello World app is about 25MB big (because of the integrated libraries)
  • If you want to use: FaceDetector, ARKit, or Payments you need to eject it to ExpoKit
  • Ejecting it to ExpoKit has a trade-off of features of Expo, e.g. you cannot share via QR code
  • When ejecting to ExpoKit you are limited to the react-native version that is supported by ExpoKit at that point in time
  • Debugging in ExpoKit (with native modules) is a lot more complicated since it mixes two languages and different libraries (no official Expo support anymore)

with all advantages and disadvantages selection of project installation type(CLI) also depends on your project type.

React native cli has a lot of manual setting but behind this, it has a plus point, that you can understand the things of android studio and Xcode, which will be helpful to debug the code more accurately.

--

--