---
description: Let's get started with our first react native app!
---

# &#x20;Getting Started

## Installing dependencies

Since we'll be using Expo Tool to create react native applications, we'll need to install the Expo CLI tool, which depends on NodeJS as well. If you do not have NodeJS installed, it is recommended that you install the package from their [official website](https://nodejs.org/en/download/) or using your system's [package manager](https://nodejs.org/en/download/package-manager/).

Once we have NodeJS installed, we can continue with installing the Expo CLI tool. To install the Expo CLI tool, run the following command:

```bash
sudo npm install -g expo-cli
```

Ignore any warnings that you might encounter during the installation. In case the installation fails, try the below command:

```bash
sudo npm install -g expo-cli --legacy-peer-deps
```

This will install the Expo CLI tool with legacy peer dependencies.

## Creating an Expo App

Once we have NodeJS and Expo CLI tool installed, we can now proceed to create a new application. It's as simple as using the CRA command for web development!

```bash
mkdir <app-repo> && cd <app-repo>
expo init <app-name>
```

The above command will create a new Expo app within the `app-repo` directory. It will also prompt us to select a template to start with, so here we will start with the `blank` template.

When the above command is done executing, we can then `cd` into the app directory, and run the following command to initialize the app:

```bash
yarn start
```

This will run the expo script to run the application in development mode. This will open up a webpage at `http://localhost:19002/` and also show us a QR Code that we can then scan and use the application on our native devices. The QR code is also displayed on the terminal as well!

![http://localhost:19002/](https://3124585617-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McJYvRoUkjwwpIItezp%2F-McXRhhKS91ibrZ30Q_H%2F-McXiRcE3dZ4MN0YpEQn%2FScreenshot%202021-06-19%20at%2010.53.27.png?alt=media\&token=a211503a-278d-409f-ba54-530506dc82f1)

![QR Code for the app in the terminal.](https://3124585617-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McJYvRoUkjwwpIItezp%2F-McXRhhKS91ibrZ30Q_H%2F-McXiXJppmMpA74ibcy5%2FScreenshot%202021-06-19%20at%2010.53.44.png?alt=media\&token=ae1be501-13a2-40ea-8737-6cea5f2d5b7f)

In order to run this Expo app on our native devices, we first need to install the `Expo Client` (now renamed to `Expo Go`) app on our native devices. Once this app is installed, use the inbuilt camera to scan the QR code displayed on the webpage/terminal, which will redirect you to the Expo Go app, where we can see our app running! Below is a screenshot of the same:

![First App running on Expo Go (iOS).](https://3124585617-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McJYvRoUkjwwpIItezp%2F-McXRhhKS91ibrZ30Q_H%2F-McXjbYH4WFz2sE8xaoj%2FIMG_3328F08DB167-1.jpeg?alt=media\&token=a62a1523-26ba-4bf3-ad97-c8f3db6c50e4)

{% hint style="info" %}
For Android devices, we can simply scan the QR code from within the Expo Go app, which will spin up our `first-app`.
{% endhint %}
