In my navigation file , when I want to toggle drawer , get the following error :
TypeError: navigation.openDrawer is not a function.(In \'navigation.ope
While constructing navigation at options, you refer to the navigation of the stack, what cant perform draw actions, try to construct it on header itself
navigation
options
{ return { headerLeft: (navigation) => { navigation.toggleDrawer(); // <--- this line throws an error }} /> } }} component={DrawerNavigator} />
https://github.com/react-navigation/react-navigation/issues/55