React native 生命周期

 组件加载的时候触发的函数:      constructor 、componentWillMount、 render 、componentDidMount (dom操作,请求数据) 组件数据更新的时候触发的生命周期函数:     shouldComponentUpdate(nextProps, nextState) 是否要更新数据,接收两个参数,return true;才会执行更新数据操作  
相关文章
相关标签/搜索