React Native itself as a framework definitely made cross-platform apps development faster, but people have found many ways to make it even faster, such as Expo.
For many professional developers, Expo could be considered an essential tool, but there are some considerations to not develop an app with Expo.
So, why don’t we start by explaining what Expo is and get to know the answer to this common dilemma.
What is Expo, and How is it Used in React Native?
This framework gives developers command line tools for building apps, an online editor and platform for running React Native apps in a browser. Then, on the technical side, it also provides prebuilt components for common tasks such as geolocation or accessing native APIs.
What Are the Benefits of Using Expo?
There are several advantages we can mention here:
- Simplified setup:
Expo allows developers to get started with development very quickly because it handles most native dependencies, so that it isn’t necessary to configure native development tools such as Android Studio.
- Live reloading:
Just like many other development frameworks, Expo also provides a hot/live reload feature that allows the developer to automatically reload the mobile app whenever changes/updates happen, so those updates can be seen immediately.
- Easy to test:
By utilizing their Expo Go, developers can test their apps on real devices, as simple as scanning a QR code to install the app. This makes getting feedback from others easier.
- Ready to use modules/APIs:
Expo SDK provides many ready to use APIs for both platforms, including basic native APIs for location, camera access, file system, social auth, and much more.
To build native mobile apps using Expo, you need two tools: the Expo CLI and the Expo Go mobile application.
Expo CLI (Command Line Interface)
Before installing Expo CLI, make sure you have Node.js and npm installed. To check if you have these two programs running, open up a terminal and run these commands:
Next, to install the Expo CLI itself, run this command:
npm install -g expo-cli
After the installation process is successful, it allows you to run Expo commands from your terminal, such as creating a project called “my-starter-project”. To do this, you can run:
npx create-expo-app my-starter-project
For further guidance, there’s no better guide than Expo’s official documentation.
After finishing the environment setup, the next step is to download “Expo Go” on your Android/iOS device. We recommend you to create your own account to use most of the Expo Go features.
It is an app that provides a quick way of deploying and testing the app directly onto your devices, as opposed to using an emulator.
Similar to their guides, Expo has put out a nice list of their own limitations on their documentation, so we’re not going to re-explain, but instead there are some important limitations to highlight.
- Not every native module is available, such as API for Bluetooth. But many of the features that have been in development right now, or at least been brought up.
- Can’t support third party libraries with native code.
In other words, if you know that your app will rely on some third-party libraries with native language, then it’s unlikely that Expo will be an option.
Want to know what are the best React libraries you should know as React developer? Check out the list right here.
The answer to whether you need Expo comes again to “what are your project requirements”. If you need to build an application for both platforms without having to learn how each platform works separately—and if time is a factor in your decision-making process—then Expo might be worth looking into.
React Native is also one of our expertises, let’s talk about your project, and we’ll discuss how our experienced developers can help your project right here.