diff --git a/docs/api.md b/docs/api.md index ec723da99..2ce434c14 100644 --- a/docs/api.md +++ b/docs/api.md @@ -161,7 +161,7 @@ interface NativeRouterProps extends MemoryRouterProps {} `` is the recommended interface for running React Router in a [React Native](https://reactnative.dev) app. - `` defaults to `["/"]` (a single entry at the root `/` URL) -- `` defaults to the last index of `props.initialEntries` +- `` defaults to the last index of `initialEntries` ```tsx import * as React from "react"; @@ -199,7 +199,7 @@ interface MemoryRouterProps { A `` stores its locations internally in an array. Unlike `` and ``, it isn't tied to an external source, like the history stack in a browser. This makes it ideal for scenarios where you need complete control over the history stack, like testing. - `` defaults to `["/"]` (a single entry at the root `/` URL) -- `` defaults to the last index of `props.initialEntries` +- `` defaults to the last index of `initialEntries` > **Tip:** > diff --git a/packages/react-router-dom/server.tsx b/packages/react-router-dom/server.tsx index d75b76ed0..b9399312e 100644 --- a/packages/react-router-dom/server.tsx +++ b/packages/react-router-dom/server.tsx @@ -15,7 +15,7 @@ export interface StaticRouterProps { export function StaticRouter({ basename, children, - location: locationProp + location: locationProp = "/" }: StaticRouterProps) { if (typeof locationProp === "string") { locationProp = parsePath(locationProp);