Hi! o/
I’m started a project with Tab navigation. So I have the navigation/RootNavigation.js
and navigation/MainTabNavigator.js
file.
Everything are ok with my routes and tab. But when I tried to add a drawer in the same screen of my tabs. I get stranges behaviors.
My code:
RootNavigation.js: RootNavigation.js - Pastebin.com
MainTabNavigator.js: MainTabNavigator.js - Pastebin.com
Basically, I added “TabNavigator” to “DrawerNavigator”. And the “DrawerNavigator” to “StackNavigator”
Now I have two types of screen:
Type One:
Screen with Tabs and Drawer
Type Two:
Screen without Tabs and Drawer (just a Header with back button and title)
My screen Type One works “fine”. (I just cannot make the drawer show above the header, but it’s another problem)
But the Type Two, when I click in “back button” (on header) I get back to home screen (initialRoute). The expected are get to previews screen (like: navigation.goBack()
). The physical button on android device works fine.