# Function createMemoryRouter

- createMemoryRouter(routes, opts?): RemixRouter

- #### Parameters

  - routes: RouteObject[]
  - `Optional` opts: {
    basename?: string;
    future?: Partial<Omit<FutureConfig, "v7_prependBasename">>;
    hydrationData?: Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
    initialEntries?: InitialEntry[];
    initialIndex?: number;
    unstable_dataStrategy?: unstable_DataStrategyFunction;
    }

    - ##### `Optional` basename?: string

    - ##### `Optional` future?: Partial<Omit<FutureConfig, "v7_prependBasename">>

    - ##### `Optional` hydrationData?: Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>

    - ##### `Optional` initialEntries?: InitialEntry[]

    - ##### `Optional` initialIndex?: number

    - ##### `Optional` unstable_dataStrategy?: unstable_DataStrategyFunction

  #### Returns RemixRouter

  - Defined in common/temp/node_modules/.pnpm/react-router@6.23.1_react@18.3.1/node_modules/react-router/dist/index.d.ts:17