Interface: LocationLike
API / @xmachines/play-router / LocationLike
Defined in: types.ts:432
The minimal location interface of an adapter that reads the current URL at the
moment of connect(). You can inject it for SSR and for a test: give a mock in
place of the global location when no DOM is available.
The definition is structural, and it holds no reference to Location. This package
therefore compiles without the DOM lib.
Example
// SSR or a test — an injected mockconst mockLoc: LocationLike = { pathname: "/dashboard", search: "?tab=posts" };connectRouter({ actor, routeMap, location: mockLoc });Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
pathname | readonly | string | types.ts:433 |
search | readonly | string | types.ts:434 |