Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 10 characters in body
Source Link
David Buck
  • 3.9k
  • 40
  • 54
  • 73

import {DrawerActions} from '@react-navigation/native';

<Drawer.Navigator screenOptions={{ drawerPosition: 'right', }}> <Drawer.Screen name="Home" component={Home} options={{ headerStyle: { backgroundColor: 'orange', }, headerTintColor: 'black', headerLeft:false, headerRight: () => ( <TouchableOpacity onPress={() => navigation.dispatch(DrawerActions.openDrawer())}> ), }} /> <Drawer.Screen name="Standings" component={Standings} /> </Drawer.Navigator>

import {DrawerActions} from '@react-navigation/native'; <Drawer.Navigator screenOptions={{ drawerPosition: 'right', }}> <Drawer.Screen name="Home" component={Home} options={{ headerStyle: { backgroundColor: 'orange', }, headerTintColor: 'black', headerLeft:false, headerRight: () => ( <TouchableOpacity onPress={() => navigation.dispatch(DrawerActions.openDrawer())}> <Icon name="menu" size={30} color="black" /> </TouchableOpacity> ), }} /> <Drawer.Screen name="Standings" component={Standings} /> </Drawer.Navigator> 

itIt worked for me.

import {DrawerActions} from '@react-navigation/native';

<Drawer.Navigator screenOptions={{ drawerPosition: 'right', }}> <Drawer.Screen name="Home" component={Home} options={{ headerStyle: { backgroundColor: 'orange', }, headerTintColor: 'black', headerLeft:false, headerRight: () => ( <TouchableOpacity onPress={() => navigation.dispatch(DrawerActions.openDrawer())}> ), }} /> <Drawer.Screen name="Standings" component={Standings} /> </Drawer.Navigator>

it worked for me

import {DrawerActions} from '@react-navigation/native'; <Drawer.Navigator screenOptions={{ drawerPosition: 'right', }}> <Drawer.Screen name="Home" component={Home} options={{ headerStyle: { backgroundColor: 'orange', }, headerTintColor: 'black', headerLeft:false, headerRight: () => ( <TouchableOpacity onPress={() => navigation.dispatch(DrawerActions.openDrawer())}> <Icon name="menu" size={30} color="black" /> </TouchableOpacity> ), }} /> <Drawer.Screen name="Standings" component={Standings} /> </Drawer.Navigator> 

It worked for me.

Source Link

import {DrawerActions} from '@react-navigation/native';

<Drawer.Navigator screenOptions={{ drawerPosition: 'right', }}> <Drawer.Screen name="Home" component={Home} options={{ headerStyle: { backgroundColor: 'orange', }, headerTintColor: 'black', headerLeft:false, headerRight: () => ( <TouchableOpacity onPress={() => navigation.dispatch(DrawerActions.openDrawer())}> ), }} /> <Drawer.Screen name="Standings" component={Standings} /> </Drawer.Navigator>

it worked for me