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: website/docs/concepts/router.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,13 +80,13 @@ fn switch(route: &Route) -> Html {
80
80
81
81
### Navigation
82
82
83
-
To navigate between pages, use either a `Link` component (which renders a `<a>` element)or the `yew_router::push_route` function.
83
+
To navigate between pages, use either a `Link` component (which renders a `<a>` element), the `yew_router::push_route` function, or the `yew_router::replace_route` function, which replaces the current page in the user's browser history instead of pushing a new one onto the stack.
84
84
85
85
### Query Parameters
86
86
87
87
#### Specifying query parameters when navigating
88
88
89
-
In order to specify query parameters when navigating to a new route, use `yew_router::push_route_with_query`function.
89
+
In order to specify query parameters when navigating to a new route, use either `yew_router::push_route_with_query`or the `yew_router::replace_route_with_query` functions.
90
90
It uses `serde` to serialize the parameters into query string for the URL so any type that implements `Serialize` can be passed.
91
91
In its simplest form this is just a `HashMap` containing string pairs.
0 commit comments