Interface: VanillaRouter<History>
API / @xmachines/play-dom-router / VanillaRouter
Defined in: play-dom-router/src/create-router.ts:17
The router that createRouter builds.
The type parameter carries the history of the CALLER. createBrowserHistory gives a
DisposableBrowserHistory back, and a bare VanillaRouter would widen it to
BrowserHistory — so using stop = router.history.subscribe(fn) would refuse to
compile through the very path the README documents. A test double that hands a plain
function back stays a plain BrowserHistory, because the parameter says what it says.
The default keeps VanillaRouter usable with no argument, which is what
connect-router.ts writes.
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
History extends BrowserHistory | BrowserHistory |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
history | readonly | History | The history instance | play-dom-router/src/create-router.ts:21 |
routeTree | readonly | RouteTree | The route tree, as a reference to the structure | play-dom-router/src/create-router.ts:26 |
Methods
destroy()
destroy(): void;Defined in: play-dom-router/src/create-router.ts:31
Cleans up
Returns
void