Yes, you should start your React Native project with Expo

appandflow

App & Flow

Posted on November 29, 2019

Yes, you should start your React Native project with Expo

This seems to be one of the most frequent questions on Reddit and on other developer communities: “Should I start my project with Expo?”. Some say yes, some say no. At App & Flow, every single React Native project is started with Expo, no questions asked. Because frankly, there is very little reason not to. What are the reasons? You can read them on Expo’s own website here. They are:

  1. Your app needs background code execution
  2. You need a native module that is not yet available in Expo (ie: Bluetooth)
  3. App size is critical (needs to minimize the bundle size as much as possible)
  4. You want to use a particular Push Notification service, other than what Expo offers

Other than that, why wouldn’t you use Expo?


Common misconceptions around Expo

Expo is good for prototyping, not for production
WRONG. I read this a lot on /r/reactnative, and I never understand why. We’ve built quite a few applications that are in production using Expo, some bigger than others, and it makes it so much easier. Updating to the latest React Native version? Handled by Expo. Over the air updates? Oh I’ll need to install Codepush. Nope! Handled by Expo. Want to share your progress with your team or your client? You can setup Testflight and go that way if you have enough time to spend waiting for the build to process every time you upload one, or you can share it instantly via an Experience in the Expo Client application. The idea that Expo cannot be used for production is, in our opinion, not founded on any good reasons other than the ones listed on Expo’s website. Not only will it make your life easier, but if you do client work they will also appreciate the fact that you are doing what you can to speed up the process.

If our needs change in the future, we will have to start over
Again, this is wrong. We’ve been in this situation multiple times and the solution is very straight forward. Both situations were because we needed Bluetooth connectivity along the way, which is not yet supported by Expo. All you need to do is eject your project from the Expo Client. Your project will still work the exact same way it used to, but it will now be depending on ExpoKit, which is a Java/Obj-C library that exposes every module from Expo’s API. From now on, your project will be like if you started it with vanilla React Native, allowing you to react-native link your heart out.

I have no other options but to link
So you and your team have been working on a project for a little while, in Expo, everything is going well, but now you want to have a nice, native looking picker for your users to use. You start to look around and you find the perfect library. It looks native because it is native, it handles both Android and iOS, this will definitely make our life easier. You npm install, and then you see step 2: the dreaded npm link. Now you have a choice to make: do you eject for a picker library, do you use another input type or do you create your own implementation in JS and make it open source for the Expo developer community? The last option of course! Sure it will a bit more time than ejecting, but not only will Expo save you time in the long run, you will also be helping a whole community by making your work open source. The next person looking for a picker for his or her Expo project will have one to use, all because of you! (Shout out to Vince for his JS implementation of the Picker)

TLDR: Expo offers you, out of the box

  1. Over the air updates
  2. An easy and more reliable way of upgrading React Native versions
  3. Android Studio/XCode configurations
  4. Certificates management with Apple or Keystores management with Google
  5. Push Notifications
  6. Additional, easy to use modules such as AuthSession or BlurView

Expo offers a great developer experience, and it is very valuable for any mobile startup since moving quickly is key. It is our opinion that starting a project without Expo is complicating things for no benefits at all. If you’ve ever dealt with Android Studio or XCode, you know for a fact that you can reasonably waste a day or two messing around with the IDE’s for trivial stuff that does not count as progress.
The team at Expo is incredibly active and responsive, you can easily reach out to them via their forums or Slack channel, and they also have a Canny up for feature requested by the community. Unless you have a specific case where Expo should not be used, per their own reasons, do yourself and your clients a favor and start your project with it!

💖 💪 🙅 🚩
appandflow
App & Flow

Posted on November 29, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related