You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-8.x/auth-flow.md
+19-21Lines changed: 19 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,11 +88,11 @@ This means:
88
88
89
89
This makes it impossible to navigate to the `Home` when the user is not signed in, and to `SignIn` when the user is signed in.
90
90
91
-
When the values returned by `useIsSignedin` and `useIsSignedOut` change, the screens matching the condition will change:
91
+
When the values returned by `useIsSignedIn` and `useIsSignedOut` change, the screens matching the condition will change:
92
92
93
-
- Let's say, initially `useIsSignedOut` returns `true`. This means that `SignIn`screens is shown.
93
+
- Let's say, initially `useIsSignedOut` returns `true`. This means that the `SignIn`screen is shown.
94
94
- After the user signs in, the return value of `useIsSignedIn` will change to `true` and `useIsSignedOut` will change to `false`, which means:
95
-
- React Navigation will see that the `SignIn` screen is no longer matches the condition, so it will remove the screen.
95
+
- React Navigation will see that the `SignIn` screen no longer matches the condition, so it will remove the screen.
96
96
- Then it'll show the `Home` screen automatically because that's the first screen available when `useIsSignedIn` returns `true`.
97
97
98
98
The order of the screens matters when there are multiple screens matching the condition. For example, if there are two screens matching `useIsSignedIn`, the first screen will be shown when the condition is `true`.
@@ -170,14 +170,14 @@ This means:
170
170
171
171
This makes it impossible to navigate to the `Home` when the user is not signed in, and to `SignIn` when the user is signed in.
172
172
173
-
When the value of `isSignedin` changes, the screens defined based on the condition will change:
173
+
When the value of `isSignedIn` changes, the screens defined based on the condition will change:
174
174
175
-
- Let's say, initially `isSignedin` is `false`. This means that `SignIn`screens is shown.
176
-
- After the user signs in, the value of `isSignedin` will change to `true`, which means:
175
+
- Let's say, initially `isSignedIn` is `false`. This means that the `SignIn`screen is shown.
176
+
- After the user signs in, the value of `isSignedIn` will change to `true`, which means:
177
177
- React Navigation will see that the `SignIn` screen is no longer defined, so it will remove the screen.
178
-
- Then it'll show the `Home` screen automatically because that's the first screen defined when `isSignedin` returns `true`.
178
+
- Then it'll show the `Home` screen automatically because that's the first screen defined when `isSignedIn` returns `true`.
179
179
180
-
The order of the screens matters when there are multiple screens matching the condition. For example, if there are two screens defined based on `isSignedin`, the first screen will be shown when the condition is `true`.
180
+
The order of the screens matters when there are multiple screens matching the condition. For example, if there are two screens defined based on `isSignedIn`, the first screen will be shown when the condition is `true`.
181
181
182
182
</TabItem>
183
183
</Tabs>
@@ -228,16 +228,15 @@ export default function App() {
- Linking configuration for the screens in the top tab navigator.
62
-
- TypeScript types for the screens in the top tab navigator.
61
+
- Linking configuration for the screens in the bottom tab navigator.
62
+
- TypeScript types for the screens in the bottom tab navigator.
63
63
64
64
Since the nested navigator is defined using the dynamic API, we need to handle these manually. For the linking configuration, we can define the screens in the `linking` property of the `Feed` screen:
Copy file name to clipboardExpand all lines: versioned_docs/version-8.x/community-navigators.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Community navigators
4
4
sidebar_label: Community navigators
5
5
---
6
6
7
-
This guide lists various community navigators for React Navigation. These navigators offer provide UI components for navigation with the familiar React Navigation API.
7
+
This guide lists various community navigators for React Navigation. These navigators provide UI components for navigation with the familiar React Navigation API.
8
8
9
9
If you're looking to build your own navigator, check out the [custom navigators guide](custom-navigators.md).
@@ -1119,7 +1121,7 @@ By default, paths defined for each screen are matched against the URL relative t
1119
1121
const ProfileTabs = createBottomTabNavigator({
1120
1122
screens: {
1121
1123
Profile: {
1122
-
screen:HomeScreen,
1124
+
screen:ProfileScreen,
1123
1125
linking: {
1124
1126
path:'users/:id',
1125
1127
},
@@ -1171,7 +1173,7 @@ In this case, it makes more sense to navigate to the `Profile` screen using a UR
1171
1173
constProfileTabs=createBottomTabNavigator({
1172
1174
screens: {
1173
1175
Profile: {
1174
-
screen:HomeScreen,
1176
+
screen:ProfileScreen,
1175
1177
linking: {
1176
1178
path:'users/:id',
1177
1179
// highlight-next-line
@@ -1229,13 +1231,13 @@ Sometimes, you may not want to have the route name of a screen in the path. For
1229
1231
constRootStack=createStackNavigator({
1230
1232
screens: {
1231
1233
Home: {
1232
-
screen:ProfileScreen,
1234
+
screen:HomeScreen,
1233
1235
linking: {
1234
1236
path:'home',
1235
1237
},
1236
1238
},
1237
1239
Profile: {
1238
-
screen:HomeScreen,
1240
+
screen:ProfileScreen,
1239
1241
linking: {
1240
1242
path:'users/:id',
1241
1243
},
@@ -1272,13 +1274,13 @@ You can specify an empty string as path or not specify a path at all, and React
1272
1274
constRootStack=createStackNavigator({
1273
1275
screens: {
1274
1276
Home: {
1275
-
screen:ProfileScreen,
1277
+
screen:HomeScreen,
1276
1278
linking: {
1277
1279
path:'',
1278
1280
},
1279
1281
},
1280
1282
Profile: {
1281
-
screen:HomeScreen,
1283
+
screen:ProfileScreen,
1282
1284
linking: {
1283
1285
path:'users/:id',
1284
1286
},
@@ -1386,7 +1388,7 @@ const config = {
1386
1388
</TabItem>
1387
1389
</Tabs>
1388
1390
1389
-
You can also provide a your own function to serialize the params. For example, let's say that you want to use a DD-MM-YYYY format in the path instead of a timestamp:
1391
+
You can also provide your own function to serialize the params. For example, let's say that you want to use a DD-MM-YYYY format in the path instead of a timestamp:
@@ -1446,7 +1450,7 @@ Depending on your requirements, you can use this functionality to parse and stri
1446
1450
1447
1451
If you need more complex matching logic, you can use regular expressions to match the path. For example, if you want to use the pattern `@username` to match a user's profile, you can use a regular expression to match the path. This allows you to have the same path pattern for multiple screens, but fine-tune the matching logic to be more specific for a particular screen.
1448
1452
1449
-
Regular expressions can be specified between parentheses `(` and `)`in the after a param name. For example:
1453
+
Regular expressions can be specified between parentheses `(` and `)` after a param name. For example:
The [example app](https://github.com/react-navigation/react-navigation/tree/main/packages/example) includes a variety of patterns and is used as a simple way for contributors to manually integration test changes.
137
+
The [example app](https://github.com/react-navigation/react-navigation/tree/main/example) includes a variety of patterns and is used as a simple way for contributors to manually integration test changes.
138
138
139
139
While developing, you can run the [example app](https://github.com/react-navigation/react-navigation/tree/main/example) with [Expo](https://expo.io/) to test your changes:
0 commit comments