React—生命周期

页面加载

constructor—>componentWillMount()—>render—>componentDidMuont()

点击一个按钮

componentWillReceiveProps()—>shouldComponentUpdata()—>componentWillUpdate()—>render—>ComponentDidUpdate()

猜你喜欢

转载自www.cnblogs.com/dreamhouse/p/9072045.html