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: docs/en/api/go.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,27 @@ Programatically navigate to a new route.
4
4
5
5
### Arguments
6
6
7
-
-`path: String`
7
+
-`path: String | Object`
8
8
9
-
The path must be a plain path (i.e. no dynamic segments or star segments). The path doesn't start with `/`, it will be resolved relative to the current active path.
9
+
The path can be either a String or an Object.
10
+
11
+
If a String, the path must be a plain path (i.e. no dynamic segments or star segments). The path doesn't start with `/`, it will be resolved relative to the current active path.
12
+
13
+
If an Object, it can either be in the form of:
14
+
15
+
```js
16
+
{ path:'...' }
17
+
```
18
+
19
+
Or:
20
+
21
+
```js
22
+
{
23
+
name:'...',
24
+
// params and query are optional
25
+
params: { ... },
26
+
query: { ... }
27
+
}
28
+
```
29
+
30
+
For details about the `name` Object format, see [Named Routes](../named.md).
0 commit comments