一、重要的钩子
1、render:初始化渲染或更新渲染调用
2、componentDidMount:开启监听,发送ajax请求
3、componentWillUnmount:做一些收尾工作,如:清理定时器
二、即将废弃的钩子
1、componentWillMount
2、componentWillReceiveProps
3、componentWillUpdate
一、重要的钩子
1、render:初始化渲染或更新渲染调用
2、componentDidMount:开启监听,发送ajax请求
3、componentWillUnmount:做一些收尾工作,如:清理定时器
二、即将废弃的钩子
1、componentWillMount
2、componentWillReceiveProps
3、componentWillUpdate