| 1 | ---
|
| 2 | title: Installation
|
| 3 | order: 1
|
| 4 | ---
|
| 5 |
|
| 6 | # Installation
|
| 7 |
|
| 8 | [MODES: framework]
|
| 9 |
|
| 10 | ## Introduction
|
| 11 |
|
| 12 | Most projects start with a template. Let's use a basic template maintained by React Router:
|
| 13 |
|
| 14 | ```shellscript nonumber
|
| 15 | npx create-react-router@latest my-react-router-app
|
| 16 | ```
|
| 17 |
|
| 18 | Now change into the new directory and start the app
|
| 19 |
|
| 20 | ```shellscript nonumber
|
| 21 | cd my-react-router-app
|
| 22 | npm i
|
| 23 | npm run dev
|
| 24 | ```
|
| 25 |
|
| 26 | You can now open your browser to `http://localhost:5173`
|
| 27 |
|
| 28 | You can [view the template on GitHub][default-template] to see how to manually set up your project.
|
| 29 |
|
| 30 | We also have a number of [ready to deploy templates][react-router-templates] available for you to get started with:
|
| 31 |
|
| 32 | ```shellscript nonumber
|
| 33 | npx create-react-router@latest --template remix-run/react-router-templates/<template-name>
|
| 34 | ```
|
| 35 |
|
| 36 | ---
|
| 37 |
|
| 38 | Next: [Routing](./routing)
|
| 39 |
|
| 40 | [default-template]: https://github.com/remix-run/react-router-templates/tree/main/default
|
| 41 | [react-router-templates]: https://github.com/remix-run/react-router-templates
|
| 42 | |
| \ | No newline at end of file |