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

shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate

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

componentWillReveiceProps
shouldComponentUpdate
componentWillUpdate
render
componentDidUpdate

相关文章:

  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2021-10-13
相关资源
相似解决方案