how to add navigation drawer in stack navigation in react native code example

Example 1: react native drawer navigation example

import * as React from 'react';
import { Button, View } from 'react-native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { NavigationContainer } from '@react-navigation/native';

function HomeScreen({ navigation }) {
  return (
    
      

Example 2: put stacknavigator in drawernvigator

Home: {  navigationOptions: {    drawerIcon: ({ tintColor }) => (            ),    drawerLabel: "Home"  },  screen: Home},

Tags:

Misc Example