React Native Apps - Know When to Use Expo

To Expo, or not to Expo, that is the question. All jokes aside, this is a very important question to many React Native developers.


First, a summary of what exactly React Native is. Without diving too far into the nitty-gritty, React Native is a cross-platform library that builds native mobile applications (on iOS and Android). React Native uses a combination of Javascript and React in order to allow for the seamless development of cross-platform apps.





What is Expo?

Expo is a framework that greatly assists in building React Native apps. When using Expo, you can develop, build, and (most importantly) deploy React Native apps with only one Javascript codebase - this is essential.


When to use Expo?

Knowing when to use Expo is absolutely critical. There are a lot of reasons for when to use Expo, but here are just a few:


1) K.I.S.S. (Keep It Simple Stupid)

It is by far the fastest way to develop cross-platform applications. With Expo, you can build and deploy your source code to both iOS and Android with ease. Expo handles all of the work, you just need to run a few CLI commands and you are off and rolling!





2) No native code is needed.

If your project doesn't explicitly require native code, Expo is the choice for you. You don't even need to know how to right native Swift or Java code at all. React Native handles all of the platform-dependent details for you. As long as you know Javascript/Typescript, you can write a React Native app.


3) Expo is open source and always expanding.

Everyone loves FREE, right? Expo is free, open-source, and consistently maintained/updated by the community. That being said, Expo SDK is always expanding. Expo handles a ton of built-in native APIs that are very popular with mobile apps. Some include push notifications, camera permissions, and geolocation.


4) Forget about those giant programs that kill your CPU.

Xcode is Apple's development software that is designed to help developers build and deploy iOS mobile apps, while Android Studio is the Google equivalent. For anyone who is familiar with these two, they are incredibly useful. The downfall is that they absolutely HAMMER your CPU. I know for me personally, if I have them running at the same time, my Macbook feels like it is approximately 200 degrees. Anyway...we can do away with using these tools entirely when using Expo. Build and deploy the apps painlessly with VS Code or your favorite IDE.





When NOT to use Expo?

Everything sounds great so far. So why would we not want to use Expo? Here are a few use cases:


1) You are a native code developer.

There are two ways to develop React Native applications: a managed workflow and a bare workflow. The first uses Expo, while the second does not. If you need to use native code, you will want to defer to a bare workflow. Taking this path will require using Xcode and Android Studio to build the apps natively on each platform, which will ultimately take twice the amount of time. The big upside here though is that you have full control over the native features of the app.


2) Certain native APIs are unavailable on Expo.

While Expo handles probably 95% of native APIs, there are some that are still not available yet. The In-App Purchases API is by far the most painful. Native IAP functionality can be developed using Expo. However, it is not easily testable on each platform. They cannot be tested or implemented using a managed workflow and must use a bare workflow. For more details on IAPs specifically, we have an article for that ;).




Conclusion:

Let's answer our question from before - To Expo, or not to Expo? The simplest answer is that it is up to you. Super helpful...we know. But truly it depends on the use cases of your application. Within our portfolio of React Native apps, we have used Expo on nearly all of them. If a client requires In-App Purchases or other features that are outside of the current list of Expo APIs, we will eject to a bare workflow and do development natively.


Our Recommendation - Use Expo!

In our experience, we would recommend Expo to 99% of React Native developers.



Do you have an idea and need help turning it to a reality? Book an appointment with us today (for FREE !!). Why wait around?


10 views0 comments

Recent Posts

See All