-
-
Save libcorrales/a3c848acfd6fbfc6158f70b8102f617a to your computer and use it in GitHub Desktop.
React Navigation - Stack Sample - App.js
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 { NavigationContainer } from '@react-navigation/native'; | |
import { createStackNavigator } from '@react-navigation/stack'; | |
const Stack = createStackNavigator(); | |
const App = () => { | |
return ( | |
<NavigationContainer> | |
<Stack.Navigator> | |
<Stack.Screen | |
name="Welcome" | |
component={WelcomeScreen} | |
options={{ title: 'Welcome' }} | |
/> | |
<Stack.Screen name="Greeting" component={GreetingScreen} /> | |
</Stack.Navigator> | |
</NavigationContainer> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment