/react-hello

Primary LanguageJavaScript

项目知识点

1,包含的基础内容

JSX语法、组件的拆分、自定义函数组件、自定义 class 组件、props 属性、render 方法、state 状态更新、生命周期函数,组件通信

2,redux 数据管理

store 的写法、修改 store 中的数据、refs 属性获取、redux-thunk 中间件

3,router 路由

router 路由的基本使用,路由传参、Switch 路由匹配、二级路由的使用


3,axios 本地请求

项目包含的插件

react-router-dom、redux-thunk、axios

项目的配置与启动

1,所需要的环境

安装 node.js 和 npm
可自行到 node 官网下载,下载 node 完成后,npm 也会自行下载完成。

通过cmd执行 node -vnpm -v 查看是否下载成功和下载成功后的版本号。

安装 cnpm 通过 cmd 执行 npm config set registry https://registry.npm.taobao.org

2,项目拉取 和 安装依赖

安装 git
在所选文件夹执行 git clone https://github.com/WHYwanghuayang/react-hello.git
等待拷贝完毕 cd react-hello
执行 npm install 安装所需依赖 ,package.json 内所需要的插件会自动安装

3,项目运行及启动

安装依赖完成后
执行 npm run start 打开 http://localhost:3000