aksonov / react-native-router-flux

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

Switching between Navigation Drawers not reflected #3385

Open Sushant-Sardeshpande opened 5 years ago

Sushant-Sardeshpande commented 5 years ago

React Native Version - 0.56 Router Flux Version - 4.0.6

Had a use case where we were mounting a Drawer component containing a Tab Navigator within it and would have to reset to a scene on the level of the drawer before switching to another Drawer component. This results in no component life cycle method for the second navigation drawer.

Had something like:

`

` Navigate from the Splash component to Login and then Drawer 1, after which navigate to Splash component and try to navigate to Drawer 2 but no update in transition state.
aksonov commented 5 years ago

It maybe fixed after #3393

Sushant-Sardeshpande commented 5 years ago

After some more debugging, found out that it's got to do with property updates some how. The router resides within a component that is connected with redux and when these properties are updated it is causing the router to remount after which navigation to a tab component does not reflect. Also, tried moving from TabBarBottom which is deprecated to BottomTabBar as well as upgrading react-navigation to 3.0.9 and react-navigation-tabs to 1.0.2.