- 打开终端,进入所需目录文件
$ cd ReactApp
- 运行npx create-react-app my-app --template typescript命令
$ npx create-react-app my-app --template typescript
# or
yarn create react-app my-app --template typescript
- 安装完成,使用编辑器打开即可进入编写
$ cd ReactApp
$ npx create-react-app my-app --template typescript
# or
yarn create react-app my-app --template typescript