Interface: RouteLookupContract
API / @xmachines/play-dom-router / RouteLookupContract
Defined in: play-dom-router/src/connect-router.ts:15
The structural route lookup interface that connectRouter accepts.
Every object with these two methods satisfies the constraint. A RouteMap
instance, a subclass, and a plain test object all work.
getPathByStateId can receive the stateId in the form "#stateId" or in the
bare form "stateId". The bridge tries both forms. Therefore an implementation
that holds one form only still resolves the path.
Methods
getPathByStateId()
getPathByStateId(id): string | null | undefined;Defined in: play-dom-router/src/connect-router.ts:17
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
string | null | undefined
getStateIdByPath()
getStateIdByPath(path): string | null | undefined;Defined in: play-dom-router/src/connect-router.ts:16
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
string | null | undefined