aksonov / react-native-router-flux

The first declarative React Native router
MIT License
8.99k stars 2.11k forks source link

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

Open anuk112 opened 3 years ago

anuk112 commented 3 years ago

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?

Rananjaya commented 1 year ago

Same issue here. How did you fix that ?