React setState和修改props触发的钩子

2022-12-01,,,,

1. setState的改变会触发4个生命周期钩子

shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate

2. props的改变会触发5个生命周期钩子

componentWillReveiceProps
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate

React setState和修改props触发的钩子的相关教程结束。

《React setState和修改props触发的钩子.doc》

下载本文的Word格式文档,以方便收藏与打印。