Skip to content

Instantly share code, notes, and snippets.

@rahgurung
Last active August 13, 2022 17:49
Show Gist options
  • Save rahgurung/f5d01345774b2e25663c523ff76fb7a8 to your computer and use it in GitHub Desktop.
Save rahgurung/f5d01345774b2e25663c523ff76fb7a8 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 {createNativeStackNavigator} from '@react-navigation/native-stack';
// Initialize the Stack navigator
const Stack = createNativeStackNavigator();
// We always surround navigator with NavigationContainer
function StackNavigation() {
return (
<NavigationContainer>
<Stack.Navigator>
{/* Add your screens here */}
</Stack.Navigator>
</NavigationContainer>
);
}
export default StackNavigation;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment