Skip to main content

matchRoutes

matchRoutes<RouteObjectType>(routes: RouteObjectType[],locationArg: string | Partial<Location>,basename: string): AgnosticRouteMatch<string, RouteObjectType>[] | null

Matches the given routes to a location and returns the match data.

Properties

(Mandatory properties are in bold)
PropertiesTypeDescription
locationArgstring | Partial<Location>
routesRouteObjectType[]
Additional properties for advanced use cases
PropertiesTypeDescription
basenamestring