以前没用过脚手架,心血来潮想要学一下:
react 官网都有介绍 ( https://reactjs.org/docs/hello-world.html )
1.Docs(文档)
2.INStAllAtION
3.Create a New React App
1. 安装 node // node官网
2. 安装 npm
3. 安装脚手架 npm install -g create-react-app (React 自带的脚手架,稳定,好用)
4. 创建项目
(先 cd 到你要创建项目的位置, 例如:cd Desktop )
create-react-app todolist // 创建项目
cd todolist // 进到创建的项目
npm run start // 把项目跑起来