Skip to content

Commit 9f837e3

Browse files
committed
Update tutorial to use create-react-admin
1 parent a0c70a3 commit 9f837e3

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

docs/Tutorial.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,24 @@ Here is an overview of the result:
1717

1818
## Setting Up
1919

20-
React-admin uses React. We'll use [Vite](https://vitejs.dev/) to create an empty React app, and install the `react-admin` package:
20+
React-admin uses React. We'll use [create-react-admin](https://github.com/marmelab/react-admin/tree/master/packages/create-react-admin) to bootstrap a new admin:
2121

2222
```sh
23-
yarn create vite test-admin --template react-ts
24-
cd test-admin/
25-
yarn add react-admin ra-data-json-server
23+
yarn create react-admin test-admin
24+
```
25+
26+
Choose **JSON Server** as the data provider, then **None** as the auth provider. Don't add any resource for now and just press **Enter**. Finally, choose either `npm` or `yarn` and press **Enter**. Once everything is installed, enter the following commands:
27+
28+
```sh
29+
cd test-admin
30+
npm run dev
31+
# or
2632
yarn dev
2733
```
2834

29-
You should be up and running with an empty React application on port 5173.
35+
You should be up and running with an empty React admin application on port 5173.
3036

31-
**Tip**: Although this tutorial uses a TypeScript template, you can use react-admin with JavaScript if you prefer. Also, you can use [create-react-app](./CreateReactApp.md), [Next.js](./NextJs.md), [Remix](./Remix.md), or any other React framework to create your admin app. React-admin is framework-agnostic.
37+
**Tip**: Although this tutorial uses a TypeScript template, you can use react-admin with JavaScript if you prefer. Also, you can use [Vite](https://vitejs.dev/), [create-react-app](./CreateReactApp.md), [Next.js](./NextJs.md), [Remix](./Remix.md), or any other React framework to create your admin app. React-admin is framework-agnostic.
3238

3339
## Using an API As Data Source
3440

0 commit comments

Comments
 (0)