I got the following error while trying to do so.I am using React Navigation 5 It is showing Object is not a function
Here is my code
const HeaderLeft = ({ navigation }) => {
return (
<View style={{flexDirection: 'row'}}>
<Icon name="menu" size={24}
color= 'white'
onPress={ () => navigation.toggleDrawer() } />
</View>
);}
This is how I added it in screen
<MenuNavigator.Navigator
initialRouteName='Menu'
screenOptions={{
headerStyle: {
backgroundColor: "#512DA8"
},
headerTintColor: "#fff",
headerLeft: ({ navigation }) => (<HeaderLeft navigation={navigation} />),
headerTitleStyle: {
color: "#fff"
},
}}
>
Please Help me on the above Bug