createRouter

external fun createRouter(options: RouterOptions): Router(source)

Creates a new Router instance for React.

Pass the returned router to RouterProvider to enable routing. Notable options: routeTree (your route definitions) and context (required if the root route was created with createRootRouteWithContext).

Parameters

options

Router options used to configure the router.