Wednesday, October 28, 2020

According to the official React Native documentation, the best way of getting started with react native is by installing reactive native CLI and using it to generate a new project.

 

npm install –g react-native-cli

However, a lot of things have changed during the last months, now we have more options available for getting started with react native.

The best of these new options in my option and the one I’m going to go over in this tutorial is EXPO. EXPO is a set of handy tools that helps developing react native applications. We can use expo as a tool to generate and test new react native applications.

Before EXPO existed, the only option for creating new React native apps was using the React Native CLI which we can use by installing it through npm. Using Reactive Native CLI require us to install XCode in MACOS for IOS applications and Android Studio for Android applications, having to install and configure all these dependencies android has been in my experience a pain in the back, especially setting up android on windows to work with react native.

Currently you can still be using the React Native CLI for creating new project but honestly I can not think of a single good reason for continue using it. The React Native team is now also providing a couple of options other that EXPO. These options are the Create React Native App Command line tool and Sketch.

[vc_custom_heading text=”Installing EXPO “]

First you need to go to https://expo.io/ and download EXPO XDE.

After that you need to use EXPO XDE to create a new React native application, the EXPO XDE runs the JS Packager just like the one that runs inside React Native CLI, we feed our application into the JS Packager and finally all this is deployed into the EXPO App which runs on our Device, EXPO App has to be installed from the App Store.

Other Great feature EXPO provides are Extra Device API’s as having direct access to the camera, Easy Push Notifications, Easy On Device Testing, Common Extra Components or third party components as Maps and UI Components

To Lunch EXPO, we need to go to the application menu and click on EXPO XDE, once we load XDE we are prompted to create a new project. Once the project is created you will see a screen like this one.

After this is complete all you need to do is to click the Send Link Button, provide a phone number or email, then you are going to receive a link that will open the EXPO App on your device

EXPO XDE also provide the option of running on IOS simulator or Android Emulator.