react 新特性
作者:互联网
生命周期分三个阶段:
创建阶段(Mounting)、更新阶段(Updating)、卸载阶段(Unmounting)
Mounting
constructor()
static getDerivedStateFromProps()
componentWillMount()
render()
componentDidMount()
Update
componentWillReceiveProps()
statice getDerivedStateFromProps()
shouldComponentUpdate()
componentWillUpdate()
render()
getSnapshotBeforeUpdate()
componentDidUpdate()
Unmouting
componentWillUnmount()
componentDidCatch()
标签:getSnapshotBeforeUpdate,componentWillUpdate,render,getDerivedStateFromProps,Moun 来源: https://blog.csdn.net/yana_loo/article/details/98092553