Skip to content

Instantly share code, notes, and snippets.

@libcorrales
Created August 10, 2021 20:35
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/a3c848acfd6fbfc6158f70b8102f617a to your computer and use it in GitHub Desktop.
Save libcorrales/a3c848acfd6fbfc6158f70b8102f617a to your computer and use it in GitHub Desktop.
React Navigation - Stack Sample - App.js
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