react-navigation-backhandler
react-navigation-backhandler copied to clipboard
TabNavigator Android back button
Hi there! I'm using your package with a screen inside a TabNavigator and it looks like my back button callback is only being called from the second time the tab is changed. What I mean is, when I arrive at the screen the callback is not called when I press back on the device. Only when I navigate away from the screen and then come back does the back button behave as I expect.
@isghanim i have same issue did you solve it?
@isghanim @vaqif14 same here, any updates?
+1
<Tab.Navigator lazy={false} >
I solved with the above code
@MR03web solution didn't work for me. Handling of the Android back button in a TabNavigator is not yet supported.
The section 'Custom Android back button behavior' in the react-navigation docs says:
The presented approach will work well for screens that are shown in a
StackNavigator
. Custom back button handling in other situations may not be supported at the moment (eg. A known case when this does not work is when you want to handle back button press in an open drawer. PRs for such use cases are welcome!).