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-7.x/native-stack-navigator.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1016,6 +1016,7 @@ Navigates back to a previous screen in the stack by popping screens after it. Th
1016
1016
1017
1017
-`name` - _string_ - Name of the route to navigate to.
1018
1018
-`params` - _object_ - Screen params to pass to the destination route.
1019
+
-`merge` - _boolean_ - Whether params should be merged with the existing route params, or replace them (when navigating to an existing screen). Defaults to `false`.
1019
1020
1020
1021
If a matching screen is not found in the stack, this will pop the current screen and add a new screen with the specified name and params.
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/navigation-actions.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ The `navigate` action allows to navigate to a specific route. It takes the follo
28
28
29
29
-`name` - _string_ - A destination name of the screen in the current or a parent navigator.
30
30
-`params` - _object_ - Params to use for the destination route.
31
+
-`merge` - _boolean_ - Whether params should be merged with the existing route params, or replace them (when navigating to an existing screen). Defaults to `false`.
31
32
32
33
<TabsgroupId="config"queryString="config">
33
34
<TabItemvalue="static"label="Static"default>
@@ -283,13 +284,20 @@ In a stack navigator ([stack](stack-navigator.md) or [native stack](native-stack
283
284
- If you're on a different screen, it will push the new screen onto the stack.
284
285
- If the [`getId`](screen.md#id) prop is specified, and another screen in the stack has the same ID, it will navigate to that screen and update its params instead.
285
286
287
+
<details>
288
+
<summary>Advanced usage</summary>
289
+
286
290
The `navigate` action can also accepts an object as the argument with the following properties:
287
291
288
292
- `name` - _string_ - A destination name of the screen in the current or a parent navigator
289
293
- `params` - _object_ - Params to use for the destination route.
290
-
- `merge` - _boolean_ - Whether we should merge the params of the current route with the provided `params`. Defaults to `false`.
294
+
- `merge` - _boolean_ - Whether params should be merged with the existing route params, or replace them (when navigating to an existing screen). Defaults to `false`.
291
295
- `path` - _string_ - The path (from deep link or universal link) to associate with the screen.
292
296
297
+
This is primarily used internally to associate a path with a screen when it's from a URL.
298
+
299
+
</details>
300
+
293
301
### reset
294
302
295
303
The `reset` action allows to reset the [navigation state](navigation-state.md) to the given state. It takes the following arguments:
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/navigation-object.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,9 @@ The `navigate` method lets us navigate to another screen in your app. It takes t
74
74
75
75
`navigation.navigate(name, params)`
76
76
77
-
-`name` - A destination name of the route that has been defined somewhere
78
-
-`params` - Params to pass to the destination route.
77
+
-`name` - _string_ - A destination name of the screen in the current or a parent navigator.
78
+
-`params` - _object_ - Params to use for the destination route.
79
+
-`merge` - _boolean_ - Whether params should be merged with the existing route params, or replace them (when navigating to an existing screen). Defaults to `false`.
79
80
80
81
<TabsgroupId="config"queryString="config">
81
82
<TabItemvalue="static"label="Static"default>
@@ -297,8 +298,8 @@ It takes the following arguments:
297
298
298
299
`navigation.navigateDeprecated(name, params)`
299
300
300
-
-`name` - A destination name of the route that has been defined somewhere
301
-
-`params` - Params to pass to the destination route.
301
+
-`name` - _string_ - A destination name of the screen in the current or a parent navigator.
302
+
-`params` - _object_ - Params to use for the destination route.
302
303
303
304
In a stack navigator ([stack](stack-navigator.md) or [native stack](native-stack-navigator.md)), calling `navigate` with a screen name will have the following behavior:
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/stack-actions.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -534,6 +534,7 @@ The method accepts the following arguments:
534
534
535
535
-`name` - _string_ - Name of the route to navigate to.
536
536
-`params` - _object_ - Screen params to pass to the destination route.
537
+
-`merge` - _boolean_ - Whether params should be merged with the existing route params, or replace them (when navigating to an existing screen). Defaults to `false`.
Copy file name to clipboardExpand all lines: versioned_docs/version-7.x/stack-navigator.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -588,6 +588,10 @@ Navigates back to a previous screen in the stack by popping screens after it. Th
588
588
-`name` - _string_ - Name of the route to navigate to.
589
589
-`params` - _object_ - Screen params to pass to the destination route.
590
590
591
+
-`name` - _string_ - Name of the route to navigate to.
592
+
-`params` - _object_ - Screen params to pass to the destination route.
593
+
-`merge` - _boolean_ - Whether params should be merged with the existing route params, or replace them (when navigating to an existing screen). Defaults to `false`.
594
+
591
595
If a matching screen is not found in the stack, this will pop the current screen and add a new screen with the specified name and params.
0 commit comments