Create a new DataRouter that manages the application path using an
in-memory History
stack. Useful for non-browser environments without a DOM API.
function createMemoryRouter(
routes: RouteObject[],
opts?: MemoryRouterOpts,
): DataRouter
Application routes
Basename path for the application.
Override the default data strategy of loading in parallel. Only intended for advanced usage.
Future flags to enable for the router.
A function that returns an RouterContextProvider instance
which is provided as the context argument to client actions,
loaders and middleware.
This function is called to generate a fresh context instance on each
navigation or fetcher call.
Hydration data to initialize the router with if you have already performed data loading on the server.
Initial entries in the in-memory history stack
Index of initialEntries the application should initialize to
Lazily define portions of the route tree on navigations.
An initialized DataRouter to pass to <RouterProvider>