Developer Preview Feature
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Creates and initializes an LWR router.
| Method Input | Type | Required/Optional | Description |
|---|---|---|---|
config | RouterConfig object | Optional | Pass in the RouterConfig object you want to create a router for. If you don’t specify a RouterConfig, LWR creates a router with default values. |
We recommend that you specify a RouterConfig for createRouter(). If you don’t pass in a value for RouterConfig.routes, the router can’t match any locations.
Note
1import { createRouter } from 'lwr/router';
2
3createRouter(config?: RouterConfig
4 ): Router<PageReference>See Also
Developer Preview Feature