Expo vs React-Native-CLI

The 2 methods to get a React Native project up and running

Dinuka Piyadigama
3 min readMay 27, 2020
React Native with Expo (https://www.educative.io/api/edpresso/shot/6147144445591552/image/4513991721222144)

When you try to start with your first project, you’ll come across 2 methods to get a React Native project up and running in the React Native docs Setting up the development environment page.

Whichever method you decide to choose, there won’t be any difference in the code syntax.

Where Expo shines

Expo is a third-party wrapper that brings in many convenient features that simplify development and which also happens to be free. The main advantage of using Expo is that you can get many features like accessing the camera, location, notifications, sensors, haptics with the out-of-the-box setup. Where-as, if you use React-Native-CLI, you’ll have to basically build-up these features.

Expo also gives the added convenience of having a dedicated mobile app in both Android & iOS which can be used to preview the built app without having to use Android Studio or XCode. The steps that are required to be followed in order to preview the app are quite straightforward and simple as well. The build happens as soon as changes are saved in the code. This also means that even if you don’t have a MacBook, you can still preview the app in an iPhone.

Where React-Native-CLI shines

But, the biggest downside of using Expo for a React Native project is that native Java or iOS code can’t be connected with Expo. Whereas with React-Native-CLI, this can be done.

The other downside is that since Expo is a third-party service, it may take time to get up to date with the React-Native-CLI features which are developed by the React Native Team and the open-source community. Since the React-Native-CLI development also happens in accordance with whatever new features Apple & Google decide to offer in their operating systems, you might end up getting late to adding the new cool stuff to your apps. But, it seems as if the Expo team has been doing quite a good job of getting things up and ready quite quickly.

But! the good thing is that the project can be ejected from Expo to React-Native-CLI at any stage of the development process. So, you can always start safely with Expo and get onto React-Native-CLI whenever you realize that you need to integrate any native Java/ iOS code into the project or bring in any functionalities that haven’t been supported by Expo.

If you’re a React developer who’s just started working with React Native, check out my other blog post which explains all you need to know about React Native.

--

--