组件挂载前执行
1、componentWillMount
组件挂载后执行
2、componentDidMount
组件更新之前执行
3、shouldComponentUpdate
组件被更新之前执行但在shouldComponentUpdate之后执行,如果shouldComponentUpdate返回true执行 返回false不执行
4、componentWillUpdate
组件更新完成之后执行
5、componentDidUpdate
存在于自组件中,要从父组件接受参数,第一次存在于父组件中不会执行,父组件执行render会触发componentWillReceiveProps函数
6、compoentWillReceiveProps
当一个组件将被销毁之前执行
7、componentWillMount
评论一下?