首先假设你已经安装好了node和npm
1.安装create-react-app
npm install -g create-react-app
2.创建一个名为helloreact的项目
create-react-app helloreact
3.项目文件介绍

4.启动项目&构建项目
npm start //启动项目
npm test //启动测试单元
npm run build //构建项目
5.访问项目
在浏览器打开: http://localhost:3000
网友评论