In this article, we will learn how to install Expo CLI for building React Native applications.
Prerequisites:
- Node.js must be installed on your machine. (To download Node.js visit the website: https://nodejs.org/en/)
Features of Expo Command Line Interface:
- It’s a third party service which is absolutely free.
- It is a kind of a managed App development workflow. It takes a lot of complexity away from you because building React Apps can be very complex sometimes especially when it comes to integrating some Native Device features.
- Not just this, it also provides a lot of convenience and Utility features. It makes development of React Native apps so much easier.
- The downside is that you are limited to the Expo ecosystem because Expo is like a wrapper around your app.
Getting Started with Installation:
1.Visit https://expo.io/ and click on Get Started option.
2. Upon clicking Get started option, you will find starting steps here.
3. We don’t really need the first step. We can jump directly towards the second step of the installation process.
4. Ignore the second step if Node.js is already installed on your system. Proceed to the third step by opening your Command prompt(CMD) and paste the given command in Step3 (npm install expo-cli — global) in your cmd. Doing this will help you install Expo CLI globally on your machine which will help you manage build React Native apps. You can use it anywhere on your machine and from anywhere in the terminal.
You can ignore all the in-between errors and warnings and wait for the installation to finish.
5. Wait till this message prompts on the screen.
6. After completing the 3rd Step, navigate to the path where you want to create the folder for your project using the cd command. After that type in the following command: expo init <any folder name>
Eg. expo init rn-first-app
7. Now it will ask for the template to choose. Choose for the blank option. Make sure you don’t go for the minimal option because that would be the setup without the Expo environment.
8. After choosing the option above, it will again run some set of installations and dependencies.
9. Now the project is all set to go. Navigate into the newly created folder and type in the npm start.
10. npm start will now start up the Expo development to the Expo Dev Tools and a new tab should open in your browser.
11. Here is the tab that opens. This is the Expo Development tool( or Dev Tools). It’s a window that let’s run your app to different connected device simulators and this is a very convenient window for managing and running your app.
And this is how you can install React Native Expo CLI easily.