root-two / react-native-drawer

React Native Drawer
MIT License
2.54k stars 391 forks source link

Drawer shows for a split second when I come back to the drawer activity from pressing back #347

Open harrymash2006 opened 6 years ago

harrymash2006 commented 6 years ago

I have implemented drawer inside screen A and screen B. Now when I press back(navigation.back()) I see drawer menu on screen A for a split second. How could I fix this issue? Any idea?

Thanks

provedotit commented 6 years ago

I had this issue with React Navigation too.

Here are a few things to try.

If you are using type = overlay then add a cardStyle config to your router.

const AppNav = StackNavigator( ROUTE_CONFIG, { cardStyle: { opacity: 1 } } );

I'm using the Drawer with type = static. The update above to cardStyle removed the split second flash of the Drawer but then I got a double header flash when using the back button.

This ultimately worked for me: #131