Skip to content

Instantly share code, notes, and snippets.

@rahgurung
Created August 29, 2022 18:25
Show Gist options
  • Save rahgurung/44e2624776d44bc173a8be90e80c4bf4 to your computer and use it in GitHub Desktop.
Save rahgurung/44e2624776d44bc173a8be90e80c4bf4 to your computer and use it in GitHub Desktop.
import * as React from 'react';
import { Text } from 'react-native';
// Imports related to navigation
import {NavigationContainer} from '@react-navigation/native';
import {createDrawerNavigator} from '@react-navigation/drawer';
// Initialize the Drawer navigator
const Drawer = createDrawerNavigator();
// We always surround navigator with NavigationContainer
function DrawerNavigation() {
return (
<NavigationContainer>
<Drawer.Navigator>
{/* Add your Drawer components here */}
</Drawer.Navigator>
</NavigationContainer>
);
}
export default DrawerNavigation;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment