A hook that handles route changes.
- Since
- 4.2.0
- Source
Returns:
The route handler state and actions.
- Type:
- object
Methods
(inner) addRouteHandler(id, handler)
Add a route handler.
Parameters:
| Name | Type | Description |
|---|---|---|
id | string | The id of the route handler. |
handler | function | The handler function. |
- Since
- 4.2.0
(inner) removeRouteHandler(id)
Remove a route handler.
Parameters:
| Name | Type | Description |
|---|---|---|
id | string | The id of the route handler. |
- Since
- 4.2.0
(inner) setRoute(params, options)
Set the route. Sets isNavigating to true to prevent the routeHandlers from running.
Parameters:
| Name | Type | Description |
|---|---|---|
params | object | The params to set. |
options | object | The options to set. |
- Since
- 4.2.0