# Create React App + Firebase

## Run create-react-app

If you already have an application then you can skip these and go to installing Firebase.

To make some steps easier let's pick a name for our new application which we will save as an environment variable to reuse.

```bash
export REACT_APP=hello-firebase; # replace with your application's name
```

Use npx and create-react-app to boilerplate a new react application. I recommend using Typescript to enable type-checking

```bash
npx create-react-app ${REACT_APP} --typescript
```

Wait a little bit while create-react-app gets ready. When finished enter the application directory:

```bash
cd ${REACT_APP}
```

## Install firebase-tools

In order to work with firebase you will need the firebase command line tool. The easiest way to get it is to install globally with npm:

```bash
npm i -g firebase-tools
```


---

# Agent Instructions: 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:

```
GET https://textav.gitbook.io/firebase-react-notes/react-+-firebase/firebase-create-react-app-setup/create-react-app-+-firebase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
