Expo and React Native are awesome tools to create apps. The only important thing is to understand the demands of your projects. Then it will be easy to choose which one to use.
The main advantage of using React Native is that you can share code between iOS and Android. Instead of that, you have to write and maintain two completely separate codebases. Moreover, you can also use many times the parts of your web app.
There are four situations in which React Native CLI is your best choice.
- Working prototypes
- Apps with streamlined UI
- Basic cross-platform apps
- Apps without heavy use of native APIs
- Applications with complex User Interface
- Building utilities such as battery monitors
- Apps built especially for a single OS
- Apps when you don’t have many animations
- You can include native modules coded in Java/Objective-C
- Developing .apk and .ipa files is much easier than with Expo
- Reusable code & pre-built components
- Simplified UI
- Third-party plugin support
- Modular architecture
React Native made a big push in mobile application development, but it has some downsides. Recently Airbnb and Udacity shared their experience in React Native. They have concluded that this platform has plenty of benefits. But you can’t use it to build any kind of mobile apps.
- It requires Android Studio and XCode to run the projects
- You can’t build an app for iOS without having a Mac
- There is no need to connect the device via USB to use for testing
- There is no need to import fonts by hand in XCode
- If you want to send your app to somebody you need to send the whole .apk / .ipa file
- You have to install and link with, for example, npm Push-Notifications, Asset Manager
- Setting up a working project in a correct way is rather difficult and can take time
- It requires a high level of configuration
- It requires a basic knowledge of Android and iOS folder structure
Now what I want to start with is the cons for Expo or the limitation, because they have quite a few. And if your app needs a specific thing, you have to check whether Expo supports it or not. So that you could know you shouldn’t consider using Expo in the first place.
- No need to link and lots of libraries
- Better development experience
- Easier to upgrade to new versions
- Easier to deploy to Apple / Google Store
- Mobile UI: It’s much easier to view on both Android and iPhone using barcode scanning. It is also easier to view with online iPhone and Android simulators.
- Over the air updates
- Easier to setup deep linking
- Expo SDK is available: Expo apps ship with Expo SDK. And it opens up lots of features to benefit you. BarcodeScanner, MapView, ImagePicker, and many more are available for your use.
- Expo involves generating an IPA file for iOS and an APK file for Android
- Ejecting: The last thing that is good to mention is that at any point you can eject out. It’s nice to know that you are not locked in and you have other options. For example, you’re using Expo and realize that you need a library out of Expo, then you can eject. Doing this, this feature is unpacking all the Native code into iOs and Android folders. Also, it is splitting the App.js file into App.js and index.js. My general experience is so much better comparing with React Native. I spent less time setting things up, and getting libraries, and React Native to work. And I had more time programming the apps, building the views, the logic. I love working with Expo. But if your app needs some specific features and packages, it’s better to choose React Native.
- Limitations: They have a nice page that onlines some of the limitations, so I’m not going to go through the entire thing. I recommend reading this list before you make a decision. But I want to highlight the biggest problem, that you cannot use native modules. I mean by that a project, where you’re can run a React Native link for, for example, vector icons.
Libraries: The vector icons library is a very popular React Native library. You can’t use them if you:
- need to change some of the iOs projects or Android projects
- touch CocoaPods or a Gradle
- write some Swift code or Kotlin code So anywhere we need to link something, it doesn’t work in Expo CLI
- Some iOS and Android APIs are not available: The other thing is to note, some of the device’s APIs are not supported. That’s a big thing as well: no Bluetooth, no Web RTC. But many features are in progress of development now, so it’s a good way to check a list of feature requests.
As you see, both ways have their pros and cons. So which one is better to use? It depends. Whenever you needs to access also your real native application development programming, then you can choose React Native CLI otherwise when your time to build or develop fast time delivery and not more futuristic features, so go for Expo CLI.