Skip to content

Instantly share code, notes, and snippets.

@libcorrales
Created August 10, 2021 20:40
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/2bfb608dc4290785f4e78172d7a16037 to your computer and use it in GitHub Desktop.
Save libcorrales/2bfb608dc4290785f4e78172d7a16037 to your computer and use it in GitHub Desktop.
React Navigation - Stack Sample - Screens.js
const WelcomeScreen = ({ navigation }) => {
return (
<Button
title="Say Hi!"
onPress={() =>
navigation.navigate('Greeting', { name: 'John Doe' })
}
/>
);
};
const GreetingScreen = ({ navigation, route }) => {
return <Text>Hi {route.params.name}!</Text>;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment