React native 生命週期

 組件加載的時候觸發的函數:      constructor 、componentWillMount、 render 、componentDidMount (dom操作,請求數據) 組件數據更新的時候觸發的生命週期函數:     shouldComponentUpdate(nextProps, nextState) 是否要更新數據,接收兩個參數,return true;纔會執行更新數據操作  
相關文章
相關標籤/搜索