[关闭]
@llqintel 2017-02-14T10:16:03.000000Z 字数 458 阅读 1044

React 知识点记录

前端


React技术面试

react最大特点

VM

是什么 对象
批量处理,只处理改动地方
方便和其他平台继承,java 虚拟机一样 使得react-native成为可能

劣势: VM对象比对也需要消耗资源

函数式编程思想

设定参数就可能生成我们期望的组件,组件作为输入和输出

jsx

生命周期函数

挂载 渲染 卸载 state props更新

首次实例化
componentWillMount
render
componentDidMount
实例化完成后的更新
getInitialState
componentWillMount
render
componentDidMount
存在期
组件已存在时的状态改变

componentWillReceiveProps
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate
销毁&清理期
componentWillUnmount

数据流向

父级到子级

事件系统

setState

组件设计

无状态组件

高阶组件

自动绑定

为什么ES6不能自动绑定

父子组件通信

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注