React脚手架搭建

React脚手架之一create-react-app搭建过程,共四步:

  1. 在项目文件夹所在目录下,npm i create-react-app -g
  2. create-react-app myreact //注意项目名不能含有大写
  3. cd myreact
  4. npm start

过程如下:

 

 

 

 

启动开发服务器后,

 

 

项目myreact目录结构:

 

 相关配置文件:

 

posted @ 2020-03-12 16:11  红桃七716  阅读(141)  评论(0编辑  收藏  举报