diff --git a/.changeset/odd-kids-buy.md b/.changeset/odd-kids-buy.md new file mode 100644 index 0000000000..62d89fd4b4 --- /dev/null +++ b/.changeset/odd-kids-buy.md @@ -0,0 +1,5 @@ +--- +"react-router": patch +--- + +fix initialEntries type in createMemoryRouter diff --git a/packages/react-router/index.ts b/packages/react-router/index.ts index 0fc8746a36..999d2d7eeb 100644 --- a/packages/react-router/index.ts +++ b/packages/react-router/index.ts @@ -17,6 +17,7 @@ import type { Router as RemixRouter, ShouldRevalidateFunction, To, + InitialEntry, } from "@remix-run/router"; import { AbortedDeferredError, @@ -203,7 +204,7 @@ export function createMemoryRouter( opts?: { basename?: string; hydrationData?: HydrationState; - initialEntries?: string[]; + initialEntries?: InitialEntry[]; initialIndex?: number; } ): RemixRouter {