Skip to content

Instantly share code, notes, and snippets.

@libcorrales
Created August 10, 2021 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save libcorrales/79179e6b5f572b99db6a4c20612bada0 to your computer and use it in GitHub Desktop.
Save libcorrales/79179e6b5f572b99db6a4c20612bada0 to your computer and use it in GitHub Desktop.
React Navigation - Drawer Sample - App.js
import * as React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
const Drawer = createDrawerNavigator();
const App = () => {
return (
<NavigationContainer>
<Drawer.Navigator initialRouteName="Welcome">
<Drawer.Screen name="Welcome" component={WelcomeScreen} />
<Drawer.Screen name="Greeting" component={GreetingScreen} />
</Drawer.Navigator>
</NavigationContainer>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment