# 啟動

{% tabs %}
{% tab title="📗 參考" %}
* &#x20;FullStackOpen ⟩ [React](https://fullstackopen.com/en/part1/introduction_to_react)
{% endtab %}

{% tab title="🛠 工具" %}
* GitHub ⟩ [create-react-app](https://github.com/facebook/create-react-app)
{% endtab %}
{% endtabs %}

## create-react-app

```bash
# create new app
npx create-react-app my-app      # new app (`my-app` subfolder created)
cd my-app                        # change to app directory

# starts the development server
# (default browser launch automatically at http://localhost:3000/)
npm start

# app code resides in `src` folder
# (App.js, index.js, ...)
```

{% hint style="warning" %}
**WARNING** 🧨

**create-react-app** automatically makes the project a **git repository** unless the application is created within an already existing repository. Most likely you **do not want** the project to become a **repository**, so run the following command in the **root of the project**.

```bash
# remove git repository
rm -rf .git
```
{% endhint %}
