Expo is Self Sufficient or Should I Go With React Native CLI
Post by: Niraj Dhungana
Posted on: Nov 11 2021
Before React Native there was only one way to code native mobile apps. Using android studio for android and xCode for IOS apps. On top of that, you need to learn two different languages for both of them. But everything changed when Facebook decided to make React Native open source.
But if you are new to React Native, there are two ways to get started with this, the Expo CLI and the Bare React Native CLI. When I was a beginner at React Native. I was so confused which one to go with Expo or React Native.
Now it's been more than one year. I am happy working with Expo React Native and in this post I will share my experience with you guys how you can choose which one to go with.
Basically Expo is a wrapper around the bare React Native. It makes things easy when you quickly want to start writing your native applications.
If you go to the React Native’s official documentation they will also suggest you to start with Expo CLI. Not because they are getting anything from Expo but it is easy to start with.
Bare React Native CLI
If you want to learn or start with Bare React Native CLI then you have to already be familiar with app development. Like if you already know how to develop native apps with android studio or xCode then you can easily start with React Native CLI.
Also to start with React Native CLI you need to have a bit powerful PC or MAC. You need to have android studio or xCode already installed inside your PC.
And android studio is not a light tool at all. It is a beast, it requires lots of ram and processor to function smoothly. Same goes for xCode. It only supports Apple products. So, you need to have a MAC for xCode.
I Know The Pain
And why am I talking about PC configuration here? In India many of us don't have access to advanced computers or computers with extra power. Because it costs lots of money to build a PC with powerful ram and processor and forget about the MAC.
When I started with programming and other computer related things I only used to have 2GB of ram and some old intel processor inside my PC. So, I can understand these things.
Expo vs Bare React Native
Like we already discussed above, Expo is easy to go with and React Native is a little hard to go with. Bare React Native requires prior knowledge with app development. It also requires a fairly strong PC.
With Bare React Native we can control almost every native base feature from android or IOS. Like files, audio, video, camera, fingerprint and all the other things. We can control all these things with Expo as well but not everything like Bear React Native. With expo you will not get full control like Bear React Native.
But the main thing is. If we use Expo to create our native app and then later we want to access native features from user’s devices. We can always exit from Expo and go with Bare React Native.
When using Bare React Native to create our application. We need to do two different setup for both android and IOS. Like if you want to use some API or library. Then you need to install and write different code to connect that code or library to both android and IOS.
Also applications made with Expo will be a bit larger in size compared to Bare React Native.
Expo is Not Only a Tool
Also Expo is not only a tool to create an application. They have lots of other premium services as well which you can leverage. Like push notification, you can build the final app for android and IOS with their custom code base.
They will also help you to submit your app to the Apple App Store or Google Play Store from the cloud with a single CLI command and provide you other support related to expo.
Now after reading all of these lines and still you think, hmm, which one to use?
Then I will suggest going with Expo. If you are only using React Native to create UI (user interface) and you don’t want to use any hard core native features. Even though you have experience with app development. Expo is easy and fast to go with.
If you already have experience with app development or your app requires access to bare native features. Then go with Bare React Native.
If you are a complete beginner then I will suggest starting with Expo to get familiar with it’s API, components and some other tips and tricks. After all, Expo is not but it’s a complete React Native. Make some app with it for better understanding to React Native and you can move to Bare React Native anytime you want.
Let me know if there is anything I forgot or needs any improvements. Also you can share this post to your group or friends if you like my thoughts.
Thanks for reading.
- React Native Multi Select on Long Press - Touchable Opacity.
- How to Setup react-native-cli and Android Emulator on Windows
- How to Compress or Manipulate Images in React Native Expo
- RecyclerListView – React Native Everything You Need to Know
- React Native Android Emulator - "could not compile settings file"