Thinking about using Expo for your next React-Native project?
Why use Expo?
One of the major hurdles while building React-Native applications is having the full set of correct configurations inside iOS and Android project files. Since it is possible to build React-Native applications both from command-line and IDE tools, as well as to perform both full and partial builds, a lot of times developers are able to compile the project by using some means, and not others. For example Xcode build might work fine, while CLI build with react-native run-ios could fail. When developers do not setup their React Native application CI pipeline at the beginning of the project, they often get stuck for days working with Xcode project files, cocoapods and gradle to make the React-Native project build with continuous integration tools.
Some of the components, which Expo includes:
Further, since Expo deals with native parts of React-Native applications, developers are able to build apps that run on iOS using PC/Linux, whereas otherwise programmers are being forced to use Macs. Expo also helps with management of certificates and app signatures.
Why not use Expo?
ExpoKit is currently a second-class citizen, even though this is slowly changing. This makes maintaining ejected/unmanaged projects difficult. At the same time, building production apps without custom native modules is often impossible. Expo does not include such commonly used component as In-App Purchases. Expo artifacts are also larger than regular React Native binaries, since it includes support for all the functionality that Expo could utilize versus only the pieces included in the app. The same applies to the application permissions. If you want to fully control what goes into the binary, Expo won’t work. Since Expo builds the application binaries for developers, it limits the control developers can exercise over their codebase. In essence, using Expo to do builds is similar to using a cloud-based build service, which is totally fine for many projects. However, if your security dictates using a private build infrastructure, managed Expo workflow won’t work.
Since almost all Expo projects end-up being ejected sooner or later, until ExpoKit workflow is properly supported, Expo is best used after an extensive features review.
Expo is a great tool for quick prototyping. Whether it will be suitable for your production application, greatly depends on the features that you need. Once/if ExpoKit gets sufficiently improved, Expo might be suitable a lot more React-Native projects.
If you are looking for some of features that come with Expo, for your classic React Native apps, consider using Visual Studio AppCenter. It has error reporting, push notifications (even background ones) and Over-The-Air (OTA) updates, as well as other goodies like integration with Azure Pipelines.
We also recommend that if you went the classic React Native route, using react-native init to setup your CI pipeline for both Android and iOS, right away.