@@ -37,7 +37,7 @@ function HomeScreen() {
37
37
< View style= {{ flex: 1 , justifyContent: ' center' , alignItems: ' center' }}>
38
38
< Text > Home Screen< / Text >
39
39
< Button onPress= {() => navigation .navigate (' Profile' )}>
40
- Go to Profile{ ' ' }
40
+ Go to Profile
41
41
< / Button>
42
42
< / View>
43
43
);
@@ -49,7 +49,7 @@ function ProfileScreen() {
49
49
return (
50
50
< View style= {{ flex: 1 , justifyContent: ' center' , alignItems: ' center' }}>
51
51
< Text > Profile Screen< / Text >
52
- < Button onPress= {() => navigation .navigate (' Home' )}> Go to Home < / Button>
52
+ < Button onPress= {() => navigation .navigate (' Home' )}> Go to Home< / Button>
53
53
< / View>
54
54
);
55
55
}
@@ -63,7 +63,6 @@ const Stack = createNativeStackNavigator({
63
63
title: ' Awesome app' ,
64
64
},
65
65
},
66
-
67
66
Profile: {
68
67
screen : ProfileScreen,
69
68
options: {
@@ -98,7 +97,7 @@ function HomeScreen({ navigation }) {
98
97
< View style= {{ flex: 1 , justifyContent: ' center' , alignItems: ' center' }}>
99
98
< Text > Home Screen< / Text >
100
99
< Button onPress= {() => navigation .navigate (' Profile' )}>
101
- Go to Profile{ ' ' }
100
+ Go to Profile
102
101
< / Button>
103
102
< / View>
104
103
);
@@ -108,7 +107,7 @@ function ProfileScreen({ navigation }) {
108
107
return (
109
108
< View style= {{ flex: 1 , justifyContent: ' center' , alignItems: ' center' }}>
110
109
< Text > Profile Screen< / Text >
111
- < Button onPress= {() => navigation .navigate (' Home' )}> Go to Home < / Button>
110
+ < Button onPress= {() => navigation .navigate (' Home' )}> Go to Home< / Button>
112
111
< / View>
113
112
);
114
113
}
@@ -230,7 +229,7 @@ function ScreenWithButton(screenName, navigateTo) {
230
229
const navigation = useNavigation ();
231
230
return (
232
231
< View style= {{ flex: 1 , justifyContent: ' center' , alignItems: ' center' }}>
233
- < Text > ` {screenName} Screen` < / Text >
232
+ < Text > {screenName} Screen< / Text >
234
233
{navigateTo && (
235
234
< Button onPress= {() => navigation .navigate (navigateTo)}>
236
235
Go to {navigateTo}
@@ -262,7 +261,7 @@ function ScreenWithButton(screenName, navigateTo) {
262
261
return function ({ navigation }) {
263
262
return (
264
263
< View style= {{ flex: 1 , justifyContent: ' center' , alignItems: ' center' }}>
265
- < Text > ` {screenName} Screen` < / Text >
264
+ < Text > {screenName} Screen< / Text >
266
265
{navigateTo && (
267
266
< Button onPress= {() => navigation .navigate (navigateTo)}>
268
267
Go to {navigateTo}
@@ -368,7 +367,7 @@ Example:
368
367
const Stack = createNativeStackNavigator ({
369
368
screenOptions: {
370
369
headerStyle: {
371
- backgroudColor : ' papayawhip' ,
370
+ backgroundColor : ' papayawhip' ,
372
371
},
373
372
},
374
373
screens: {
@@ -398,7 +397,7 @@ Similar to `options`, you can also pass a function to `screenOptions`. The funct
398
397
<Tabs groupId =" config " queryString =" config " >
399
398
<TabItem value =" static " label =" Static " default >
400
399
401
- ``` js name="Screen options for tab navigator" snack version=7
400
+ ``` js name="Screen options for tab navigator" snack version=7 dependencies=@expo/vector-icons
402
401
import * as React from ' react' ;
403
402
import { View } from ' react-native' ;
404
403
import { createStaticNavigation } from ' @react-navigation/native' ;
@@ -444,7 +443,7 @@ export default function App() {
444
443
</TabItem >
445
444
<TabItem value =" dynamic " label =" Dynamic " default >
446
445
447
- ``` js name="Screen options for tab navigator" snack version=7
446
+ ``` js name="Screen options for tab navigator" snack version=7 dependencies=@expo/vector-icons
448
447
import * as React from ' react' ;
449
448
import { View } from ' react-native' ;
450
449
import { NavigationContainer } from ' @react-navigation/native' ;
0 commit comments