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.
Function to provide the initial context values for all client side navigations/fetches
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>