JSX语法、组件的拆分、自定义函数组件、自定义 class 组件、props 属性、render 方法、state 状态更新、生命周期函数,组件通信
store 的写法、修改 store 中的数据、refs 属性获取、redux-thunk 中间件
router 路由的基本使用,路由传参、Switch 路由匹配、二级路由的使用
react-router-dom、redux-thunk、axios
安装 node.js 和 npm
可自行到 node 官网下载,下载 node 完成后,npm 也会自行下载完成。
通过cmd执行 node -v
和 npm -v
查看是否下载成功和下载成功后的版本号。
安装 cnpm 通过 cmd 执行 npm config set registry https://registry.npm.taobao.org
安装 git
在所选文件夹执行 git clone https://github.com/WHYwanghuayang/react-hello.git
等待拷贝完毕 cd react-hello
执行 npm install
安装所需依赖 ,package.json 内所需要的插件会自动安装
安装依赖完成后
执行 npm run start
打开 http://localhost:3000