Skip to content

Function: routeExists()

Documentation / @xmachines/play-router / routeExists

function routeExists(tree, path): boolean;

Defined in: query.ts:72

Validate route path exists in tree

Checks if path has corresponding state with meta.route.

Parameters

ParameterTypeDescription
treeRouteTreeRoute tree from extractMachineRoutes()
pathstringFull route path (e.g., ‘/dashboard/settings’)

Returns

boolean

true if path exists, false otherwise