Created
January 5, 2021 19:29
-
-
Save AllanGraves/476357b0b2f06ac570536fcce0f14af4 to your computer and use it in GitHub Desktop.
Changing our screens to have the ability to navigate
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 ScreenOne = ( {navigation} ) => { | |
return ( | |
<View> | |
<Text> Screen One </Text> | |
<Button | |
title="Go to Two" | |
onPress={() => navigation.navigate('Two')} | |
/> | |
</View> | |
); | |
}; | |
const ScreenTwo = ( {navigation} ) => { | |
return ( | |
<View> | |
<Text> Screen Two </Text> | |
<Button | |
title="Go to Three" | |
onPress={() => navigation.navigate('Three')} | |
/> | |
</View> | |
); | |
}; | |
const ScreenThree = ( {navigation} ) => { | |
return ( | |
<View> | |
<Text> Screen Three </Text> | |
<Button | |
title="Go to One" | |
onPress={() => navigation.navigate('One')} | |
/> | |
</View> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment