美文网首页
搭建一个react项目

搭建一个react项目

作者: 马小帅mm | 来源:发表于2018-12-31 11:20 被阅读0次

首先假设你已经安装好了node和npm

1.安装create-react-app

npm install -g create-react-app

2.创建一个名为helloreact的项目

create-react-app helloreact

3.项目文件介绍

image.png

4.启动项目&构建项目

npm start //启动项目
npm test //启动测试单元
npm run build  //构建项目

5.访问项目

在浏览器打开: http://localhost:3000

相关文章

网友评论

      本文标题:搭建一个react项目

      本文链接:https://www.haomeiwen.com/subject/bluilqtx.html