ylinwind.

React生命周期及执行顺序

字数统计: 55阅读时长: 1 min
2019/04/02 Share

React生命周期及执行顺序

React执行可分为三个阶段:装载、更新和卸载

装载阶段:

componentWillMount

render

componentDidMount

更新阶段:

componentWillRecieveProps

shouldComponentUpdate

componentWillUpdate

Render

componentDidUpdate

卸载阶段:

componentWillUnmount

更加详细的说明:->

CATALOG
  1. 1. React生命周期及执行顺序
    1. 1.1. React执行可分为三个阶段:装载、更新和卸载;
      1. 1.1.1. 装载阶段:
      2. 1.1.2. 更新阶段:
      3. 1.1.3. 卸载阶段: