react生命週期以及渲染次數

getDefaultProps(),調用1次
getInitialState(),調用1次
componentWillMount(),調用1次
render(),調用>=1次
componentDidMount():僅客戶端,調用1次
componentWillReceiveProps(object nextProps),調用>=0次
ShouldComponentUpdate(object nextProps, object nextState),調用>=0次
componentWillUpdate(object nextProps, object nextState),調用>=0次
render(),調用>=1次
componentDidUpdate(object prevProps, object prevState),調用>=0次
componentWillUnmount(),調用1次

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章