File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
versioned_docs/version-7.x Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,17 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack';
4040import { Button } from ' @react-navigation/elements' ;
4141
4242function HomeScreen () {
43+ // highlight-next-line
4344 const navigation = useNavigation ();
4445
4546 return (
4647 < View style= {{ flex: 1 , alignItems: ' center' , justifyContent: ' center' }}>
4748 < Text > Home Screen< / Text >
49+ // highlight-start
4850 < Button onPress= {() => navigation .navigate (' Details' )}>
4951 Go to Details
5052 < / Button>
53+ // highlight-end
5154 < / View>
5255 );
5356}
@@ -127,9 +130,11 @@ function DetailsScreen() {
127130 return (
128131 < View style= {{ flex: 1 , alignItems: ' center' , justifyContent: ' center' }}>
129132 < Text > Details Screen< / Text >
133+ // highlight-start
130134 < Button onPress= {() => navigation .navigate (' Details' )}>
131135 Go to Details... again
132136 < / Button>
137+ // highlight-end
133138 < / View>
134139 );
135140}
You can’t perform that action at this time.
0 commit comments