Top 7 myths about Expo in 2021
Bartłomiej Klocek•Oct 5, 2021•6 min read2021 is a very exciting year for developers who use Expo to build their mobile apps. The Expo team with the assistance of the Software Mansion open-source team have been working hard on making React Native app development quicker and simpler; as a result of this progress, many statements on the web about what you can and can’t do with Expo tools and services are no longer true. In this article, I’m going to mention some most common myths and explain why they’re no longer true.
Myth #1: You have to choose between React Native and Expo
When you open React Native installation docs, you can see, that you can either start with Expo CLI and React Native CLI. It sounds like a difficult choice at the very beginning. When you choose Expo CLI, the setup process is much simpler, and you have all Expo SDK’s features available out of the box. Choosing RN CLI would require a little more manual work.
In case you chose to start with Expo and then changed your mind or need some advanced features like custom native code/libraries that aren’t included in the Expo SDK, there is always a door open — you can either build a custom development client or “eject” into bare React Native workflow (while still being able to use Expo SDK libraries).
Migration in the opposite direction is also possible — you can read more about it here.
Myth #2: Expo doesn’t support custom native libraries
Have you ever found an awesome React Native library and found out that it doesn’t work with Expo? Lack of support for third party native libraries was the biggest limitation of Expo managed workflow. You had to “eject” to bare workflow in order to be able to use custom native libraries.
Now, this limitation applies only to the Expo Go app and Classic Builds. Since Expo SDK 42, you can build “your own custom Expo Go” and include any native library you want. A custom client can be built either locally or in the cloud with EAS Build.
There are libraries requiring custom native configuration, e.g. modifying AndroidManifest.xml or Info.plist. Thanks to Expo Config Plugins, they can be set up without touching any native code. Some libraries are already shipped with a config plugin included.
Myth #3: Ejecting is a very buggy and irreversible process
Fortunately, not anymore. The whole ‘ejecting’ process has been revisited and heavily reworked. But why did the Expo team focus on polishing the “quitting from Expo” functionality? There is a couple of reasons. One is that it’s used internally in EAS Build for building managed apps, and the other is that the Expo team changed their mindset over the last couple of years and consider managed and bare to both be first-class ways of using the tools.
To be clear, ejecting doesn’t have to mean “quitting”. The expo eject command is only generating android and ios directories + index.js. When you delete them manually, you can eject again. Expo CLI has another command: expo prebuild which currently does the same, but it doesn’t sound like it’s a one-way ticket.
Myth #4: Apps built with Expo are heavyweight
When we’re talking about “Classic Builds” (expo build:[android|ios]), app size is one of the largest drawbacks. Every app built using expo build is actually a kind of the Expo Go app but modified to run only your app’s JavaScript. It contains all Expo native SDK libraries, even those which you are not using in your app.
Why is it a myth then? Because Expo’s new build service — EAS Build solves this problem. When building a managed app, it prebuilds it first — prepares native projects including only libraries specified in package.json.
Myth #5: Bare workflow / non-Expo apps cannot be built with Expo
Yes and no. Classic Builds (expo build command) can build Expo managed apps only. But the new EAS Build service does not have such limitations and can build any React Native app, including Expo managed ones.
Myth #6: Managed apps cannot be built locally
Let’s suppose you have created your app using Managed workflow and you were testing it in the Expo Go app. Now you want to build a standalone binary. At first glance, the expo build command is the only way to do this. But not everyone wants to upload their app’s code to the cloud and wait until the build finishes. This is kind of a myth within a myth since you could always use Turtle-CLI to build locally too.
What if you want to build your managed app locally? You can use expo run:android or expo run:ios (if you have a Mac) commands. The only requirement is to have Android SDK / Xcode set up. Another option is to run EAS Build locally (eas build --local). The main difference compared to expo run is that it lets Expo handle the credentials management (app code signing etc.) for you.
Myth #7: EAS Build is a paid-only service
Update Nov 2021: EAS has a free tier now! Check out the announcement blog post here. 🎉
As of writing this article, this one is actually true. Then why did I put it here? Many people think it is going to be paid-only forever. Fortunately, when looking at the EAS Pricing page, we can see that EAS Build is a Preview feature and there’s a small asterisk sign saying:
After graduating from preview, these services will be available under the free plan.
The free tier is going to be similar to the current Classic Builds (expo build) tier. Finally, EAS Build is going to fully replace classic builds. When will EAS graduate from preview? I don’t know, probably later this year. For now, you can have 1 month free to try EAS out. All you have to do is to sign up for the EAS Priority plan, then cancel your subscription before you get charged and if you don’t have access to a credit card you can DM @expo on Twitter to get access.
I hope this article explained some common myths about Expo. If you see any of these myths being perpetuated, feel free to put a link to this article.
Introducing: Custom Development Clients We’ve spent the past year making it possible to customize the native code in your project to include native modules…blog.expo.dev
Expo managed workflow in 2021 Part 1: The preset Expo runtimeblog.expo.dev
Expo managed workflow in 2021 Part 2: Customizing the runtimeblog.expo.dev
Introducing: Expo Run Commands Expo Go can get you from zero to “hello world” without ever needing to do a native build. This works great for many…blog.expo.dev
Adding custom native code - Expo Documentation Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and…docs.expo.dev
EAS Build - Expo Documentation EAS Build is a hosted service for building app binaries for your Expo and React Native projects. It makes building your…docs.expo.dev
