If You Read One Article About "What is Expo in React Native" Read this OneJanuary 27, 2021 Publish By : Expert App Devs 5 min read Viewed By : 715
We all know about the importance of expo in react native and here we are going to discuss this, so let’s start...
What is Expo in react native? -
When you write code in Expo you are actually writing a React Native code. Expo has two main parts
- Expo CLI: expo-cli is a developer tool for creating projects, console logs and many more others.
- Expo client: expo client is an app that you download on your phone where you open your projects while you're working on them, without needing to go through XCode or Android Studio. And if you want to show it to other people then it is also possible with this app.
If you publish the expo app through expo-cli, users can access it at any time through the Expo client app. Through Expo, it is also possible to build standalone apps so users don't have to use the Expo client app to open that app, and you can distribute your app to the app store and play store as well
Installation and project creation in Expo -
For installing you need to run the following command on the terminal.
npm install --global expo-cli
Expo project creation -
expo init my-project
These are the following important tools.
- EXPO CLI
Why do developers need an expo in React Native Development? -
- Expo expands the API of React Native.
- Expo provides the js updates in minutes.
- It also provides generic client support.
- It also provides build services.
- PhoneGap is the same as Expo. because both of these try to enrich the raw API of the platform. also, they are built with a predefined set of additional native plugins.
- Expo has some other awesome features like a declarative way to set up app icons, orientations, permissions, API keys, helping you to set up push notifications, provisioning profiles, etc.
What does Expo provide that React Native doesn't? -
Here we list the advantages and disadvantages of both react native and expo, so you can easily understand the difference, so let’s start…
Benefits of using react native -
- By using react native you can add native modules written in Java/Objective-C, this is a very strong feature of react-native.
- In react native, you need Android Studio and XCode to run the projects.
- Using react native you can't develop for iOS without a mac.
- Devices must be connected via USB for testing purposes.
- For implementing fonts in react native ios, fonts need to be imported manually in XCode.
- For app sharing, you need to send the .apk / .ipa file
- For integrating Push-Notifications, Asset Manager you must be manually added and linked with npm.
Benefits of using Expo in React Mobile App Development -
- Creating a project in an expo is easy and can be done in minutes.
- Users are able to open his project while they're working on them.
- In Expo app sharing is very easy you can share it via QR-code or link, you don't need to send the whole .apk or .ipa file.
- The build is not necessary to run the app.
- Implementing some basic libraries in a standard project such as Push Notifications, Asset Manager, etc.
- Expo can build .apk and .ipa files.
- In Expo, you aren't able to add native modules and this is a very important feature.
- You can't use libraries that use native code that is written in Objective-C or Java.
- A very standard Hello World app is about 25MB which is very big in size just because of the integrated libraries.
- If you want to use these libraries such as - FaceDetector, ARKit, or Payments you need to eject it to ExpoKit.
- When you start ejecting your project to ExpoKit you are limited to the react-native version that is supported by ExpoKit.
- Debugging in ExpoKit with native modules is more complicated.
So the conclusion is Expo is a set of tools and it permits easy development, sharing, and publishing to the stores of your mobile projects. It is a little bit similar to the PhoneGap experience but in a lot better way.
You can use Expo for any new React Mobile App Development project, except these 2 cases:
- You already know you need APIs that are not available in Expo and won't be anytime soon.
- If you didn't care about your app size because the HelloWorld app takes 25MB space due to the large size of ExpoKit.
Need a consultation?
Drop us a line! We are here to answer your questions 24/7.