diff --git a/docs/react/use-in-typescript.en-US.md b/docs/react/use-in-typescript.en-US.md index 39f0730af9..0ee7afa8e8 100644 --- a/docs/react/use-in-typescript.en-US.md +++ b/docs/react/use-in-typescript.en-US.md @@ -11,10 +11,14 @@ Let's create a TypeScript project by using `create-react-app`, then import `antd Ensure your system has installed latest version of [yarn](https://yarnpkg.com) or [npm](https://www.npmjs.com/). -Create a new project named `antd-demo-ts` using yarn. +Create a new [cra-template-typescript](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript) project named `antd-demo-ts` using yarn. ```bash -$ yarn create react-app antd-demo-ts --typescript +$ 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) diff --git a/docs/react/use-in-typescript.zh-CN.md b/docs/react/use-in-typescript.zh-CN.md index 631732ce93..0aaff46711 100644 --- a/docs/react/use-in-typescript.zh-CN.md +++ b/docs/react/use-in-typescript.zh-CN.md @@ -11,10 +11,14 @@ title: 在 TypeScript 中使用 请确保电脑上已经安装了最新版的 [yarn](https://yarnpkg.com) 或者 [npm](https://www.npmjs.com/)。 -使用 yarn 创建项目。 +使用 yarn 创建 [cra-template-typescript](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript) 项目。 ```bash -$ yarn create react-app antd-demo-ts --typescript +$ yarn create react-app antd-demo-ts --template typescript + +# or + +npx create-react-app my-app --template typescript ``` 如果你使用的是 npm(接下来我们都会用 yarn 作为例子,如果你习惯用 npm 也没问题)。 diff --git a/docs/react/use-with-create-react-app.en-US.md b/docs/react/use-with-create-react-app.en-US.md index f3597efb77..965184c78b 100644 --- a/docs/react/use-with-create-react-app.en-US.md +++ b/docs/react/use-with-create-react-app.en-US.md @@ -13,6 +13,10 @@ Before all start, you may need install [yarn](https://github.com/yarnpkg/yarn/). ```bash $ yarn create react-app antd-demo + +# or + +$ npx create-react-app antd-demo ``` The tool will create and initialize environment and dependencies automatically, please try config your proxy setting or use another npm registry if any network errors happen during it. diff --git a/docs/react/use-with-create-react-app.zh-CN.md b/docs/react/use-with-create-react-app.zh-CN.md index 4f05fc15d6..f648ca2bf8 100644 --- a/docs/react/use-with-create-react-app.zh-CN.md +++ b/docs/react/use-with-create-react-app.zh-CN.md @@ -13,6 +13,10 @@ title: 在 create-react-app 中使用 ```bash $ yarn create react-app antd-demo + +# or + +$ npx create-react-app antd-demo ``` 工具会自动初始化一个脚手架并安装 React 项目的各种必要依赖,如果在过程中出现网络问题,请尝试配置代理或使用其他 npm registry。