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

# 啟動

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