> For the complete documentation index, see [llms.txt](https://sydrawat.gitbook.io/react-native/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sydrawat.gitbook.io/react-native/introduction/first-native-app.md).

# &#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/](/files/-McXiRcE3dZ4MN0YpEQn)

![QR Code for the app in the terminal.](/files/-McXiXJppmMpA74ibcy5)

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).](/files/-McXjbYH4WFz2sE8xaoj)

{% 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sydrawat.gitbook.io/react-native/introduction/first-native-app.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
