Closed sa63 closed 6 years ago
Hi @sa63, Did u try to log this.props.navigation
inside your HomeScreen.js component?
We can have some insight with what it returns. Also, if you have nested different kinds of routers in your project. It might not be receiving the correct navigation prop.
Things look fine with the two snippets you provided above.
Just a heads up if anyone else runs into this issue, I'm using nested navigators (a drawer navigator inside a stack navigator) and I was able to get the drawer button responding by calling this.props.navigation.openDrawer()
instead of this.props.navigation.navigate("DrawerOpen")
@davidstoneham not working for me.
@Jasbir23 did you have any solution for this? I have console log this.props.navigation but I got undefined. When I try to console log this.props only I got empty Object.
I can't get why Button in the HomeScreen is not opening a Drawer. Button shows but nothing happens when you click on it. Here is a code, I did all needed imports while its still not working. Are there any examples of this approach which will work?
HomeDrawer.js
HomeScreen.js
How to make that button open a drawer?