This module exposes APIs to perform routing side-effects via page.js.
Normally you wouldn't want to reach out to this directly. A better approach would be to restrict routing side-effects to your route handlers, in which case they'd access these APIs through the decorations provided by withRoutingAPIs.
However, in the case that you happen to need to interact with the router outside of a handler's context, you can use these APIs.
Transition to a different page.
pathname | String |
void |
Transition to a different page and replace the current history entry.
pathname | String |
void |
Partially update the queryString according to a set of rules:
undefined
, null
, or false
will be
removed from the queryStringIf the behaviour of discarding "falseys" is undesired, look into using Router.replaceQuery instead.
partialQuery | Object A partial set of query parameters that will be combined with (or override) the existing ones. |
void |