showing results for - "show back button instead of drawer react native functional component"
Brent
17 Jan 2016
1<Drawer.Navigator initialRouteName="Home" drawerContent={props => {
2    return (
3      <DrawerContentScrollView {...props}>
4        <DrawerItemList {...props} />
5        <DrawerItem label="Logout" onPress={() => props.navigation.navigate("Login")} />
6      </DrawerContentScrollView>
7    )
8  }}>
9    <Drawer.Screen name="Home" component={Home}/>
10    <Drawer.Screen name="New Project" component={NewProject} />
11  </Drawer.Navigator>
12
Giovanni
05 Apr 2017
1I just tried this, but it doesn't seem to work for me:
2
3const HomeScreen = props => {
4    return <Text>Hello World</Text>
5}
6HomeScreen.navigationOptions = screenProps => ({
7    headerTitle: (props) => <Text>Start</Text>,
8})
9
10<NavigationContainer>
11  <Stack.Navigator>
12    <Stack.Screen name="Home" component={HomeScreen} />
13  </Stack.Navigator>
14</NavigationContainer>
15Instead of rendering "Start", it renders "Home". I'm using version 5.10.0
16
17EDIT: Not sure if this is just a hack or not, but it works for me...
18
19<Stack.Screen 
20  name="Home"
21  component={HomeScreen}
22  options={HomeScreen.navigationOptions} />
queries leading to this page
add button to react native drawer navigationdrawer in native baseopening a drawer on a button clicked in react nativehow to add button to drawer react nativeopen drawer in all components by click of button react nativereact native functional components navigationoptionsuse navigation in react native functional componentadd button to open drawer react nativenavigation functional componenthow to open navigation drawer on button click in react nativeconnect button to navigation to open drawer react nativehow to add button for drawer navigator in reac nativebutton drawer react nativenavigationoptions react native functional componentreact native open drawer on a specific buttonhow to add a button to react native navigation drawerhow to add button in navigation drawer react nativehow to create drawer menu when button clikc in react nativehow to add toggle button in drawer navigator in react nativeadd a button in react native draweradd a toggle drawer button react nativehow to add a button in the end of drawer react nativeadd item on drawer in react nativedrawer navigation button react nativehow to add toggle button in navigation drawer in react nativedrawer navigation on button click react nativebutton inside drawer react nativehow to make button in drawer in react nativehow to use button to open drawer navigation in react nativehow to add button in drawer react nativeadd button for drawer react nativeshow back button instead of drawer react native functional componenthow to place buttons in the drawer react nativeopen drawer using button in functional compoent in reacxt nativereact nativigation add custom buttom to drawerhow to add button on react natigation drawerdrawer item styling react nativebutton inside 3c 2fdrawer navigator 3ehow to open navigation drawer on button click react nativereact native 3cdrawertogglebutton 3etoggle button navigation drawer in drawer function react nativecreate drawer add switch button react nativehow to add abutton component to drawer in react nativenavigation in functional component react nativereact native button drawerhow to open drawer on button click in react nativeadd icons in react native navigation drawernavigationoptions functional componentsadd button to drawer react nativereact native display drawer with buttonhow to place a button in drawer in react nativenavigation drawer button for open in react nativeraect native drawer with buttonsreact native drawer buttonexpo react native drawer with back buttondrawer content button react nativedrawer toggle button react nativehow to add a button on drawer navigation react nativereact native animated drawerdrawer with buttons on right react nativereact native drawerbuttoncustom drawer component react native react native toggle drawer exampleuse a toggle button for drawer in react nativehow to use navigation in functional componentscreate drawer in react nativeadd drawer button to screen react nativehow to add drawer in react nativeopen drawer on button click react nativebutton in a drawer react nativereact native toggle drawer button exampleplace back button instead of drawer button react nativehow to add icon in navigation drawer in react nativereact native navigation on back open drawerhow to open drawer from right in react nativereact native navigation functional componentadd a logout button in drawer react native drawer navigationhow to open drawer navigation on button click in react nativereact native drawer navigation examplehow to import drawer navigator react native react 4react native drawer close button after drawershow back button instead of drawer react native functional component