创建react 项目

一丶安装node.js

 

开发环境需要node.js

 

 

 

二丶安装react脚手架

npm install -g create-react-app

 (create-react-app4.0.2以后不再支持create-react-app全局的方式创建项目)

最新创建项目方法:
//直接npm create-react-app /* 项目名 */
npx create-react-app my-app
// 创建react ts项目
npx create-react-app my-app --template typescript

三丶运行项目

npm start

 

 

posted @ 2022-03-19 08:29  live丶  阅读(31)  评论(0编辑  收藏  举报