Skip to content

Interface: RouteMapOptions

API / @xmachines/play-react-router / RouteMapOptions

Defined in: play-router/src/create-route-map.ts:9

Options for createRouteMap and createRouteMapFromTree.

Properties

PropertyTypeDescriptionDefined in
cacheSize?numberMaximum number of resolved parameterized path lookups to cache. RouteMap.getStateIdByPath() resolves parameterized patterns (e.g. /profile/:userId) via URLPattern on every call. Frequently visited paths are cached in an LRU so subsequent lookups are O(1). Increase this value for applications with large parameterized route sets or high navigation frequency. Default: 500.play-router/src/create-route-map.ts:20