docs: correct install command (#30956)

close #30918
close #30913
This commit is contained in:
afc163 2021-06-11 08:34:16 +08:00 committed by GitHub
parent 1d894a2276
commit b9733aa1f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -17,16 +17,12 @@ Create a new [cra-template-typescript](https://github.com/facebook/create-react-
```bash
$ yarn create react-app antd-demo-ts --template typescript
# or
npx create-react-app my-app --template typescript
```
If you are using npm (we will use yarn in the following instructions, it's ok to replace yarn with npm)
```bash
$ npx create-react-app antd-demo-ts --typescript
$ npx create-react-app antd-demo-ts --template typescript
```
Then we go inside `antd-demo-ts` and start it.

View File

@ -22,7 +22,7 @@ $ yarn create react-app antd-demo-ts --template typescript
如果你使用的是 npm接下来我们都会用 yarn 作为例子,如果你习惯用 npm 也没问题)。
```bash
$ npx create-react-app antd-demo-ts --typescript
$ npx create-react-app antd-demo-ts --template typescript
```
然后我们进入项目并启动。