React
TIP
最后更新时间:2019年5月15日
字数:1333
主要内容
学习资源
认识React
- React 特点
- React 优点
核心概念
- 虚拟DOM
- Diff 算法
安装
- npm
- React 安装
createElement
render
XML语法
- XML语法注意点
React脚手架
- create-react-app
- 脚手架注意点
组件
- 函数组件
- class 组件
组件传值
- defaultProps
状态state
- state描述
- state特点
state VS props
setState()
class组件使用
封装独立js文件的组件
绑定事件
React基本概念对比
- React元素(Element)
- React组件
- 实例 (Instance)
- 节点 (Node)
样式
- 行内
- 样式对象
生命周期
- 三个阶段
- 创建阶段(Mounting)
- 运行和交互阶段(Updating)
- 卸载阶段(Unmounting)
- componentWillMount
- componentDidMount
- render
- shouldComponentUpdate
- componentWillUpdate
- componentDidUpdate
- componentWillReceiveProps
- componentWillUnmount
- 三个阶段
ref
受控组件
props校验
单项数据流
组件通讯
- 父 -> 子
- 子 -> 父
- 兄弟组件
路由
- 安装
- Router组件
- Link组件
- Route组件
- 匹配规则
- fetch
Redux
- Redux 介绍
- Redux 特点
- 核心概念
- state
- action
- reducer
- 示例代码