相信大家都已经知道react的生命周期了,但是具体的了解生命周期的操作吗?
接下来简单的述说一些不一样的知识点
可以获取dom的生命周期
componentDidMount
componentWillReceiveProps(不能操作)
shouldComponentUpdate(不能操作)
componentWillUpdate(不能操作)
render(不能操作)
componentDidUpdate
componentWillUnmount(不能操作)
可以修改state的生命周期
componentWillMount
componentDidMount
shouldComponentUpdate
componentWillReceiveProps
componentDidUpdate
调用setState之后执行那些生命周期
componentWillMount
render
componentDidMount
shouldComponentUpdate