createRouter()

Creates and initializes an LWR router.

Method InputTypeRequired/OptionalDescription
configRouterConfig objectOptionalPass 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.

See Also