Function createMemoryRouter
- createMemoryRouter(routes, opts?): DataRouter
Parameters
- routes: RouteObject[]
Optional
opts: {
basename?: string;
dataStrategy?: DataStrategyFunction;
future?: Partial<FutureConfig>;
hydrationData?: Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
initialEntries?: InitialEntry[];
initialIndex?: number;
patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
}Optional
basename?: string
Optional
future?: Partial<FutureConfig>
Optional
hydrationData?: Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>
Optional
initialEntries?: InitialEntry[]
Optional
initialIndex?: number