Last active
August 13, 2022 17:39
-
-
Save rahgurung/554f2addf699d0eb78acbcba965af3ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import {Text} from 'react-native'; | |
import {NavigationContainer} from '@react-navigation/native'; | |
import {createNativeStackNavigator} from '@react-navigation/native-stack'; | |
// Our Screens | |
function Screen1() { | |
return <Text>Screen 1</Text>; | |
} | |
function Screen2() { | |
return <Text>Screen 2</Text>; | |
} | |
// Initialize the Stack navigator | |
const Stack = createNativeStackNavigator(); | |
function StackNavigation() { | |
return ( | |
<NavigationContainer> | |
<Stack.Navigator> | |
<Stack.Screen name="Screen1" component={Screen1} /> | |
<Stack.Screen name="Screen2" component={Screen2} /> | |
</Stack.Navigator> | |
</NavigationContainer> | |
); | |
} | |
export default StackNavigation; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment