-
-
Save libcorrales/2bfb608dc4290785f4e78172d7a16037 to your computer and use it in GitHub Desktop.
React Navigation - Stack Sample - Screens.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
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