第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

React-Native中使用react-navigation,A跳轉(zhuǎn)到B時(shí)未觸發(fā)A

React-Native中使用react-navigation,A跳轉(zhuǎn)到B時(shí)未觸發(fā)A

眼眸繁星 2019-03-08 14:11:07
在React-Native的項(xiàng)目中使用組件react-navigation進(jìn)行頁(yè)面路由管理,在A組件的componentDidMount中開(kāi)啟一個(gè)定時(shí)器,并在componentWillUnmount中進(jìn)行清除。A頁(yè)面使用this.props.navigation.navigate('B')跳轉(zhuǎn)到B頁(yè)面后,發(fā)現(xiàn)componentWillUnmount未被執(zhí)行對(duì)于該組件的問(wèn)題網(wǎng)上有如下回答:Navigator uses stack to manager route. When you push a new page,current page wont unmount, if you pop from new page to the currentpage, the new page will unmount. And in other scene, if you rendersome child component based on some regulation like isLoading or other,the componentWillUnmount method will also be called when they nolonger need to be rendered.react-navigation組件中存在這樣的天然缺陷,不知各位如何應(yīng)對(duì)componentWillUnmount生命周期未調(diào)用的場(chǎng)景
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 1624 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)