Skip to content

Instantly share code, notes, and snippets.

@AllanGraves
Created January 5, 2021 19:29
Show Gist options
  • Save AllanGraves/476357b0b2f06ac570536fcce0f14af4 to your computer and use it in GitHub Desktop.
Save AllanGraves/476357b0b2f06ac570536fcce0f14af4 to your computer and use it in GitHub Desktop.
Changing our screens to have the ability to navigate
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