Skip to content

Commit c236094

Browse files
Minor improvements
1 parent 89fc907 commit c236094

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

versioned_docs/version-7.x/screen-options.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function HomeScreen() {
3737
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
3838
<Text>Home Screen</Text>
3939
<Button onPress={() => navigation.navigate('Profile')}>
40-
Go to Profile{' '}
40+
Go to Profile
4141
</Button>
4242
</View>
4343
);
@@ -49,7 +49,7 @@ function ProfileScreen() {
4949
return (
5050
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
5151
<Text>Profile Screen</Text>
52-
<Button onPress={() => navigation.navigate('Home')}> Go to Home </Button>
52+
<Button onPress={() => navigation.navigate('Home')}>Go to Home</Button>
5353
</View>
5454
);
5555
}
@@ -63,7 +63,6 @@ const Stack = createNativeStackNavigator({
6363
title: 'Awesome app',
6464
},
6565
},
66-
6766
Profile: {
6867
screen: ProfileScreen,
6968
options: {
@@ -98,7 +97,7 @@ function HomeScreen({ navigation }) {
9897
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
9998
<Text>Home Screen</Text>
10099
<Button onPress={() => navigation.navigate('Profile')}>
101-
Go to Profile{' '}
100+
Go to Profile
102101
</Button>
103102
</View>
104103
);
@@ -108,7 +107,7 @@ function ProfileScreen({ navigation }) {
108107
return (
109108
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
110109
<Text>Profile Screen</Text>
111-
<Button onPress={() => navigation.navigate('Home')}> Go to Home </Button>
110+
<Button onPress={() => navigation.navigate('Home')}>Go to Home</Button>
112111
</View>
113112
);
114113
}
@@ -230,7 +229,7 @@ function ScreenWithButton(screenName, navigateTo) {
230229
const navigation = useNavigation();
231230
return (
232231
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
233-
<Text>`{screenName} Screen`</Text>
232+
<Text>{screenName} Screen</Text>
234233
{navigateTo && (
235234
<Button onPress={() => navigation.navigate(navigateTo)}>
236235
Go to {navigateTo}
@@ -262,7 +261,7 @@ function ScreenWithButton(screenName, navigateTo) {
262261
return function ({ navigation }) {
263262
return (
264263
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
265-
<Text>`{screenName} Screen`</Text>
264+
<Text>{screenName} Screen</Text>
266265
{navigateTo && (
267266
<Button onPress={() => navigation.navigate(navigateTo)}>
268267
Go to {navigateTo}
@@ -368,7 +367,7 @@ Example:
368367
const Stack = createNativeStackNavigator({
369368
screenOptions: {
370369
headerStyle: {
371-
backgroudColor: 'papayawhip',
370+
backgroundColor: 'papayawhip',
372371
},
373372
},
374373
screens: {
@@ -398,7 +397,7 @@ Similar to `options`, you can also pass a function to `screenOptions`. The funct
398397
<Tabs groupId="config" queryString="config">
399398
<TabItem value="static" label="Static" default>
400399

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
402401
import * as React from 'react';
403402
import { View } from 'react-native';
404403
import { createStaticNavigation } from '@react-navigation/native';
@@ -444,7 +443,7 @@ export default function App() {
444443
</TabItem>
445444
<TabItem value="dynamic" label="Dynamic" default>
446445

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
448447
import * as React from 'react';
449448
import { View } from 'react-native';
450449
import { NavigationContainer } from '@react-navigation/native';

0 commit comments

Comments
 (0)