Skip to content

Instantly share code, notes, and snippets.

@libcorrales
Created Aug 10, 2021
Embed
What would you like to do?
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