Function: routeExists()
API / @xmachines/play-router / routeExists
function routeExists(tree, path): boolean;Defined in: query.ts:128
Tells you if a route path is in the tree
The function tests if the path has a state with a meta.route field.
Parameters
| Parameter | Type | Description |
|---|---|---|
tree | RouteTree | The route tree, from extractMachineRoutes() |
path | string | The complete route path, for example ‘/dashboard/settings’ |
Returns
boolean
true when the tree holds the path. In every other case, false