1.安装脚手架前需要安装node,npm
2. 全局安装react 脚手架
npm install create-react-app -g
3. 利用脚手架创建项目
create-react-app react_project
4. 启动项目
# npm
npm run start
# yarn
yarn start
5. 默认监听端口为3000
1.安装脚手架前需要安装node,npm
2. 全局安装react 脚手架
npm install create-react-app -g
3. 利用脚手架创建项目
create-react-app react_project
4. 启动项目
# npm
npm run start
# yarn
yarn start
5. 默认监听端口为3000