安装
npm install -g create-react-app
创建项目
项目名称不能大写
create-react-app 项目名称
// 创建ts版
create-react-app 项目名称 --template typescript
创建完成
yarn 或 npm run
Success! Created react007 at /Users/fanis/test/react/react007
Inside that directory, you can run several commands:
yarn start
Starts the development server.
yarn build
Bundles the app into static files for production.
yarn test
Starts the test runner.
yarn eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd react007
yarn start