[questions] How to reload tabs after back from outside scene

0
open
anuk112
anuk112
Posted 4 months ago

[questions] How to reload tabs after back from outside scene #3794

hello i still don't understand how to reload tabs scene after back from another scene, example :

<Tabs key="home"  >
    <Scene key="menu" component={Home} title="Home" icon={HomeIcon} hideNavBar={true}/>
    <Scene key="product" component={Product} title="Product" icon={ProductIcon} hideNavBar={true}/>
</Tabs>
<Scene key="productdetail" component={ProductDetail title="Detail Product" hideNavBar={true} />

first init is in tab home -> tab product -> product detail(i have actions to edit product & i need data in tab product reloaded) -> tab product (but not reloaded data again)


update** i already found the solutions using onEnter, but i use functional components in app.js & in someview using react hooks, how to implement that onEnter functions?