taro对应小程序的生命周期

//生命周期

componentWillMount
//在微信小程序中对应onLaunch

componentDidMount
//在微信小程序中,这一生命周期方法对应页面的onReady或者入口文件app中的onLaunch,在componentWillMount后执行

componentDidShow
//在微信小程序中这一生命周期方法对应 onShow

componentDidHide
//在微信小程序中这一生命周期方法对应 onHide


componentDidCatchError
//错误监听函数,在微信小程序中这一生命周期方法对应 onError


componentDidNotFound
//页面不存在监听函数,在微信小程序中这一生命周期方法对应 onPageNotFound

shouldComponentUpdate //页面是否需要更新

componentWillUpdate //页面即将更新

componentDidUpdate //页面更新完毕

componentWillUnmount
//页面退出,在微信小程序中这一生命周期方法对应 onUnload


 

  

posted @ 2020-07-30 18:31  文学少女  阅读(656)  评论(0编辑  收藏  举报