From 3b155981ddf30feff4c6ab6eb0d6af06f80dd71b Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Fri, 30 Jan 2026 13:44:36 -0500 Subject: [PATCH 1/2] Update docs generation to reflect new typedoc@0.27 format --- scripts/docs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docs.ts b/scripts/docs.ts index 66f316ce19..0a47089b29 100644 --- a/scripts/docs.ts +++ b/scripts/docs.ts @@ -286,7 +286,7 @@ function processTypedocModule( return; } - let modulePath = moduleName.replace(/[@\-/]/g, "_"); + let modulePath = moduleName.replace(/[@/]/g, "_"); let path = `${type}/${modulePath}.${subChild.name}.html`; let url = `https://api.reactrouter.com/v7/${path}`; lookup.set(apiName, { href: url }); From 8143658722a659bc2a6533d5b639a04b20e67e50 Mon Sep 17 00:00:00 2001 From: Remix Run Bot Date: Fri, 30 Jan 2026 18:46:32 +0000 Subject: [PATCH 2/2] chore: generate markdown docs from jsdocs --- docs/api/components/Await.md | 2 +- docs/api/components/Form.md | 6 +++--- docs/api/components/Link.md | 4 ++-- docs/api/components/Links.md | 2 +- docs/api/components/Meta.md | 2 +- docs/api/components/NavLink.md | 14 +++++++------- docs/api/components/Navigate.md | 8 ++++---- docs/api/components/Outlet.md | 2 +- docs/api/components/PrefetchPageLinks.md | 2 +- docs/api/components/Route.md | 4 ++-- docs/api/components/Routes.md | 4 ++-- docs/api/components/Scripts.md | 2 +- docs/api/components/ScrollRestoration.md | 4 ++-- docs/api/data-routers/RouterProvider.md | 6 +++--- docs/api/data-routers/StaticRouterProvider.md | 8 ++++---- docs/api/data-routers/createBrowserRouter.md | 10 +++++----- docs/api/data-routers/createHashRouter.md | 10 +++++----- docs/api/data-routers/createMemoryRouter.md | 6 +++--- docs/api/data-routers/createStaticHandler.md | 4 ++-- docs/api/data-routers/createStaticRouter.md | 12 ++++++------ docs/api/declarative-routers/BrowserRouter.md | 2 +- docs/api/declarative-routers/HashRouter.md | 2 +- docs/api/declarative-routers/HistoryRouter.md | 2 +- docs/api/declarative-routers/MemoryRouter.md | 2 +- docs/api/declarative-routers/Router.md | 6 +++--- docs/api/declarative-routers/StaticRouter.md | 6 +++--- docs/api/framework-routers/ServerRouter.md | 2 +- docs/api/hooks/useActionData.md | 2 +- docs/api/hooks/useAsyncError.md | 2 +- docs/api/hooks/useAsyncValue.md | 2 +- docs/api/hooks/useBeforeUnload.md | 2 +- docs/api/hooks/useBlocker.md | 8 ++++---- docs/api/hooks/useFetcher.md | 4 ++-- docs/api/hooks/useFetchers.md | 6 +++--- docs/api/hooks/useFormAction.md | 2 +- docs/api/hooks/useHref.md | 4 ++-- docs/api/hooks/useInRouterContext.md | 2 +- docs/api/hooks/useLinkClickHandler.md | 6 +++--- docs/api/hooks/useLoaderData.md | 2 +- docs/api/hooks/useLocation.md | 6 +++--- docs/api/hooks/useMatch.md | 6 +++--- docs/api/hooks/useMatches.md | 4 ++-- docs/api/hooks/useNavigate.md | 12 ++++++------ docs/api/hooks/useNavigation.md | 6 +++--- docs/api/hooks/useNavigationType.md | 8 ++++---- docs/api/hooks/useOutlet.md | 2 +- docs/api/hooks/useOutletContext.md | 2 +- docs/api/hooks/useParams.md | 2 +- docs/api/hooks/usePrompt.md | 2 +- docs/api/hooks/useResolvedPath.md | 8 ++++---- docs/api/hooks/useRevalidator.md | 2 +- docs/api/hooks/useRouteError.md | 2 +- docs/api/hooks/useRouteLoaderData.md | 2 +- docs/api/hooks/useRoutes.md | 6 +++--- docs/api/hooks/useSearchParams.md | 2 +- docs/api/hooks/useSubmit.md | 2 +- docs/api/hooks/useViewTransitionState.md | 10 +++++----- docs/api/rsc/RSCHydratedRouter.md | 4 ++-- docs/api/rsc/RSCStaticRouter.md | 6 +++--- docs/api/rsc/matchRSCServerRequest.md | 8 ++++---- docs/api/rsc/routeRSCServerRequest.md | 6 +++--- docs/api/utils/RouterContextProvider.md | 2 +- docs/api/utils/createContext.md | 6 +++--- docs/api/utils/createRoutesFromElements.md | 4 ++-- docs/api/utils/data.md | 2 +- docs/api/utils/generatePath.md | 2 +- docs/api/utils/isRouteErrorResponse.md | 6 +++--- docs/api/utils/matchPath.md | 4 ++-- docs/api/utils/matchRoutes.md | 4 ++-- docs/api/utils/redirect.md | 2 +- docs/api/utils/redirectDocument.md | 2 +- docs/api/utils/renderMatches.md | 4 ++-- docs/api/utils/replace.md | 2 +- docs/api/utils/resolvePath.md | 8 ++++---- 74 files changed, 166 insertions(+), 166 deletions(-) diff --git a/docs/api/components/Await.md b/docs/api/components/Await.md index 259f55d1d4..0ff499af41 100644 --- a/docs/api/components/Await.md +++ b/docs/api/components/Await.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Await.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Await.html) Used to render promise values with automatic error handling. diff --git a/docs/api/components/Form.md b/docs/api/components/Form.md index edca0da972..aa2abc1a75 100644 --- a/docs/api/components/Form.md +++ b/docs/api/components/Form.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Form.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Form.html) A progressively enhanced HTML [`
`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) that submits data to actions via [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/fetch), @@ -38,7 +38,7 @@ enabling web application user experiences. `Form` is most useful for submissions that should also change the URL or otherwise add an entry to the browser history stack. For forms that shouldn't manipulate the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) -stack, use [``](https://api.reactrouter.com/v7/types/react_router.FetcherWithComponents.html#Form). +stack, use [``](https://api.reactrouter.com/v7/types/react-router.FetcherWithComponents.html#Form). ```tsx import { Form } from "react-router"; @@ -120,7 +120,7 @@ completion of the navigation when using the Determines whether the form action is relative to the route hierarchy or the pathname. Use this if you want to opt out of navigating the route hierarchy and want to instead route based on slash-delimited URL segments. -See [`RelativeRoutingType`](https://api.reactrouter.com/v7/types/react_router.RelativeRoutingType.html). +See [`RelativeRoutingType`](https://api.reactrouter.com/v7/types/react-router.RelativeRoutingType.html). ### reloadDocument diff --git a/docs/api/components/Link.md b/docs/api/components/Link.md index cfb0949aae..545c695f8e 100644 --- a/docs/api/components/Link.md +++ b/docs/api/components/Link.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Link.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Link.html) A progressively enhanced [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) wrapper to enable navigation with client-side routing. @@ -185,7 +185,7 @@ This state is inaccessible on the server as it is implemented on top of [modes: framework, data, declarative] -Can be a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html): +Can be a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html): ```tsx diff --git a/docs/api/components/Links.md b/docs/api/components/Links.md index fa48661c7e..9d4afbb5a6 100644 --- a/docs/api/components/Links.md +++ b/docs/api/components/Links.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Links.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Links.html) Renders all the [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link) tags created by the route module's [`links`](../../start/framework/route-module#links) diff --git a/docs/api/components/Meta.md b/docs/api/components/Meta.md index 46a280cd42..8cd1bffee7 100644 --- a/docs/api/components/Meta.md +++ b/docs/api/components/Meta.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Meta.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Meta.html) Renders all the [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta) tags created by the route module's [`meta`](../../start/framework/route-module#meta) diff --git a/docs/api/components/NavLink.md b/docs/api/components/NavLink.md index 8a763dbcfd..21672c7751 100644 --- a/docs/api/components/NavLink.md +++ b/docs/api/components/NavLink.md @@ -20,19 +20,19 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.NavLink.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.NavLink.html) Wraps [``](../components/Link) with additional props for styling active and pending states. - Automatically applies classes to the link based on its `active` and `pending` -states, see [`NavLinkProps.className`](https://api.reactrouter.com/v7/interfaces/react_router.NavLinkProps.html#className) +states, see [`NavLinkProps.className`](https://api.reactrouter.com/v7/interfaces/react-router.NavLinkProps.html#className) - Note that `pending` is only available with Framework and Data modes. - Automatically applies `aria-current="page"` to the link when the link is active. See [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current) on MDN. - States are additionally available through the className, style, and children -render props. See [`NavLinkRenderProps`](https://api.reactrouter.com/v7/types/react_router.NavLinkRenderProps.html). +render props. See [`NavLinkRenderProps`](https://api.reactrouter.com/v7/types/react-router.NavLinkRenderProps.html). ```tsx Messages @@ -94,7 +94,7 @@ a.transitioning { } ``` -Or you can specify a function that receives [`NavLinkRenderProps`](https://api.reactrouter.com/v7/types/react_router.NavLinkRenderProps.html) and +Or you can specify a function that receives [`NavLinkRenderProps`](https://api.reactrouter.com/v7/types/react-router.NavLinkRenderProps.html) and returns the `className`: ```tsx @@ -125,7 +125,7 @@ Defines the link [lazy route discovery](../../explanation/lazy-route-discovery) [modes: framework, data, declarative] Changes the matching logic for the `active` and `pending` states to only match -to the "end" of the [`NavLinkProps.to`](https://api.reactrouter.com/v7/interfaces/react_router.NavLinkProps.html#to). If the URL is longer, it will no +to the "end" of the [`NavLinkProps.to`](https://api.reactrouter.com/v7/interfaces/react-router.NavLinkProps.html#to). If the URL is longer, it will no longer be considered active. | Link | URL | isActive | @@ -269,7 +269,7 @@ This state is inaccessible on the server as it is implemented on top of [modes: framework, data, declarative] Styles can also be applied dynamically via a function that receives -[`NavLinkRenderProps`](https://api.reactrouter.com/v7/types/react_router.NavLinkRenderProps.html) and returns the styles: +[`NavLinkRenderProps`](https://api.reactrouter.com/v7/types/react-router.NavLinkRenderProps.html) and returns the styles: ```tsx @@ -284,7 +284,7 @@ Styles can also be applied dynamically via a function that receives [modes: framework, data, declarative] -Can be a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html): +Can be a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html): ```tsx diff --git a/docs/api/components/Navigate.md b/docs/api/components/Navigate.md index e512b36323..71b6a3fdcd 100644 --- a/docs/api/components/Navigate.md +++ b/docs/api/components/Navigate.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Navigate.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Navigate.html) A component-based version of [`useNavigate`](../hooks/useNavigate) to use in a [`React.Component` class](https://react.dev/reference/react/Component) where @@ -43,7 +43,7 @@ function Navigate({ to, replace, state, relative }: NavigateProps): null ### relative How to interpret relative routing in the `to` prop. -See [`RelativeRoutingType`](https://api.reactrouter.com/v7/types/react_router.RelativeRoutingType.html). +See [`RelativeRoutingType`](https://api.reactrouter.com/v7/types/react-router.RelativeRoutingType.html). ### replace @@ -52,9 +52,9 @@ stack ### state -State to pass to the new [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) to store in [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state). +State to pass to the new [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) to store in [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state). ### to -The path to navigate to. This can be a string or a [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html) object +The path to navigate to. This can be a string or a [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html) object diff --git a/docs/api/components/Outlet.md b/docs/api/components/Outlet.md index 385e233435..51bd0da88c 100644 --- a/docs/api/components/Outlet.md +++ b/docs/api/components/Outlet.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Outlet.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Outlet.html) Renders the matching child route of a parent route or nothing if no child route matches. diff --git a/docs/api/components/PrefetchPageLinks.md b/docs/api/components/PrefetchPageLinks.md index 3822ea7434..97c428a99b 100644 --- a/docs/api/components/PrefetchPageLinks.md +++ b/docs/api/components/PrefetchPageLinks.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.PrefetchPageLinks.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.PrefetchPageLinks.html) Renders [``](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/rel) tags for modules and data of another page to enable an instant navigation to diff --git a/docs/api/components/Route.md b/docs/api/components/Route.md index 3db1398209..0197fd3003 100644 --- a/docs/api/components/Route.md +++ b/docs/api/components/Route.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Route.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Route.html) Configures an element to render when a pattern matches the current location. It must be rendered within a [`Routes`](../components/Routes) element. Note that these routes @@ -114,7 +114,7 @@ Mutually exclusive with `HydrateFallback`. ### id -The unique identifier for this route (for use with [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html)s) +The unique identifier for this route (for use with [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html)s) ### index diff --git a/docs/api/components/Routes.md b/docs/api/components/Routes.md index d7ff15ff39..78f9d2ae5c 100644 --- a/docs/api/components/Routes.md +++ b/docs/api/components/Routes.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Routes.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Routes.html) Renders a branch of [``s](../components/Route) that best matches the current location. Note that these routes do not participate in [data loading](../../start/framework/route-module#loader), @@ -54,5 +54,5 @@ Nested [`Route`](../components/Route) elements ### location -The [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) to match against. Defaults to the current location. +The [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) to match against. Defaults to the current location. diff --git a/docs/api/components/Scripts.md b/docs/api/components/Scripts.md index 19c03e2167..5d733d0d9e 100644 --- a/docs/api/components/Scripts.md +++ b/docs/api/components/Scripts.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Scripts.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Scripts.html) Renders the client runtime of your app. It should be rendered inside the [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body) diff --git a/docs/api/components/ScrollRestoration.md b/docs/api/components/ScrollRestoration.md index 198cb55cac..10e2b73de8 100644 --- a/docs/api/components/ScrollRestoration.md +++ b/docs/api/components/ScrollRestoration.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.ScrollRestoration.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.ScrollRestoration.html) Emulates the browser's scroll restoration on location changes. Apps should only render one of these, right before the [`Scripts`](../components/Scripts) component. @@ -62,7 +62,7 @@ function ScrollRestoration({ A function that returns a key to use for scroll restoration. This is useful for custom scroll restoration logic, such as using only the pathname so that later navigations to prior paths will restore the scroll. Defaults to -`location.key`. See [`GetScrollRestorationKeyFunction`](https://api.reactrouter.com/v7/interfaces/react_router.GetScrollRestorationKeyFunction.html). +`location.key`. See [`GetScrollRestorationKeyFunction`](https://api.reactrouter.com/v7/interfaces/react-router.GetScrollRestorationKeyFunction.html). ```tsx Promise) { ### opts.patchRoutesOnNavigation Lazily define portions of the route tree on navigations. -See [`PatchRoutesOnNavigationFunction`](https://api.reactrouter.com/v7/types/react_router.PatchRoutesOnNavigationFunction.html). +See [`PatchRoutesOnNavigationFunction`](https://api.reactrouter.com/v7/types/react-router.PatchRoutesOnNavigationFunction.html). By default, React Router wants you to provide a full route tree up front via `createBrowserRouter(routes)`. This allows React Router to perform synchronous @@ -526,5 +526,5 @@ override. Defaults to the global `window` instance. ## Returns -An initialized [data router](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) to pass to [``](../data-routers/RouterProvider) +An initialized [data router](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) to pass to [``](../data-routers/RouterProvider) diff --git a/docs/api/data-routers/createHashRouter.md b/docs/api/data-routers/createHashRouter.md index d95832da07..90dc930027 100644 --- a/docs/api/data-routers/createHashRouter.md +++ b/docs/api/data-routers/createHashRouter.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.createHashRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.createHashRouter.html) -Create a new [data router](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) that manages the application +Create a new [data router](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) that manages the application path via the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash). ## Signature @@ -78,7 +78,7 @@ function createBrowserRouter(routes, { When Server-Rendering and opting-out of automatic hydration, the `hydrationData` option allows you to pass in hydration data from your server-render. This will almost always be a subset of data from the -[`StaticHandlerContext`](https://api.reactrouter.com/v7/interfaces/react_router.StaticHandlerContext.html) value you get back from the [`StaticHandler`](https://api.reactrouter.com/v7/interfaces/react_router.StaticHandler.html)'s +[`StaticHandlerContext`](https://api.reactrouter.com/v7/interfaces/react-router.StaticHandlerContext.html) value you get back from the [`StaticHandler`](https://api.reactrouter.com/v7/interfaces/react-router.StaticHandler.html)'s `query` method: ```tsx @@ -223,7 +223,7 @@ let router = createBrowserRouter(routes, { ### opts.patchRoutesOnNavigation Lazily define portions of the route tree on navigations. -See [`PatchRoutesOnNavigationFunction`](https://api.reactrouter.com/v7/types/react_router.PatchRoutesOnNavigationFunction.html). +See [`PatchRoutesOnNavigationFunction`](https://api.reactrouter.com/v7/types/react-router.PatchRoutesOnNavigationFunction.html). By default, React Router wants you to provide a full route tree up front via `createBrowserRouter(routes)`. This allows React Router to perform synchronous @@ -525,5 +525,5 @@ override. Defaults to the global `window` instance. ## Returns -An initialized [data router](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) to pass to [``](../data-routers/RouterProvider) +An initialized [data router](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) to pass to [``](../data-routers/RouterProvider) diff --git a/docs/api/data-routers/createMemoryRouter.md b/docs/api/data-routers/createMemoryRouter.md index c8bccee7d4..0715f908a4 100644 --- a/docs/api/data-routers/createMemoryRouter.md +++ b/docs/api/data-routers/createMemoryRouter.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.createMemoryRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.createMemoryRouter.html) -Create a new [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) that manages the application path using an +Create a new [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) that manages the application path using an in-memory [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack. Useful for non-browser environments without a DOM API. @@ -154,5 +154,5 @@ Lazily define portions of the route tree on navigations. ## Returns -An initialized [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) to pass to [``](../data-routers/RouterProvider) +An initialized [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) to pass to [``](../data-routers/RouterProvider) diff --git a/docs/api/data-routers/createStaticHandler.md b/docs/api/data-routers/createStaticHandler.md index 0c3a73e9ee..616f4637f7 100644 --- a/docs/api/data-routers/createStaticHandler.md +++ b/docs/api/data-routers/createStaticHandler.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.createStaticHandler.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.createStaticHandler.html) Create a static handler to perform server-side data loading @@ -54,7 +54,7 @@ function createStaticHandler( ### routes -The [route objects](https://api.reactrouter.com/v7/types/react_router.RouteObject.html) to create a static handler for +The [route objects](https://api.reactrouter.com/v7/types/react-router.RouteObject.html) to create a static handler for ### opts.basename diff --git a/docs/api/data-routers/createStaticRouter.md b/docs/api/data-routers/createStaticRouter.md index c97d6cea9a..b4f31d5571 100644 --- a/docs/api/data-routers/createStaticRouter.md +++ b/docs/api/data-routers/createStaticRouter.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.createStaticRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.createStaticRouter.html) -Create a static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) for server-side rendering +Create a static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) for server-side rendering ```tsx export async function handleRequest(request: Request) { @@ -57,17 +57,17 @@ function createStaticRouter( ### routes -The route objects to create a static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) for +The route objects to create a static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) for ### context -The [`StaticHandlerContext`](https://api.reactrouter.com/v7/interfaces/react_router.StaticHandlerContext.html) returned from [`StaticHandler`](https://api.reactrouter.com/v7/interfaces/react_router.StaticHandler.html)'s `query` +The [`StaticHandlerContext`](https://api.reactrouter.com/v7/interfaces/react-router.StaticHandlerContext.html) returned from [`StaticHandler`](https://api.reactrouter.com/v7/interfaces/react-router.StaticHandler.html)'s `query` ### opts.future -Future flags for the static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) +Future flags for the static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) ## Returns -A static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) that can be used to render the provided routes +A static [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) that can be used to render the provided routes diff --git a/docs/api/declarative-routers/BrowserRouter.md b/docs/api/declarative-routers/BrowserRouter.md index a67a23eca0..75ce9c9299 100644 --- a/docs/api/declarative-routers/BrowserRouter.md +++ b/docs/api/declarative-routers/BrowserRouter.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.BrowserRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.BrowserRouter.html) A declarative [``](../declarative-routers/Router) using the browser [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) API for client-side routing. diff --git a/docs/api/declarative-routers/HashRouter.md b/docs/api/declarative-routers/HashRouter.md index 06a6ba0c5b..658e4011bc 100644 --- a/docs/api/declarative-routers/HashRouter.md +++ b/docs/api/declarative-routers/HashRouter.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.HashRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.HashRouter.html) A declarative [``](../declarative-routers/Router) that stores the location in the [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash) portion diff --git a/docs/api/declarative-routers/HistoryRouter.md b/docs/api/declarative-routers/HistoryRouter.md index e45d79e129..669b68cab1 100644 --- a/docs/api/declarative-routers/HistoryRouter.md +++ b/docs/api/declarative-routers/HistoryRouter.md @@ -28,7 +28,7 @@ to release notes for relevant changes. ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.unstable_HistoryRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.unstable_HistoryRouter.html) A declarative [``](../declarative-routers/Router) that accepts a pre-instantiated `history` object. diff --git a/docs/api/declarative-routers/MemoryRouter.md b/docs/api/declarative-routers/MemoryRouter.md index 4d47f5cd8c..7fa8c4286e 100644 --- a/docs/api/declarative-routers/MemoryRouter.md +++ b/docs/api/declarative-routers/MemoryRouter.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.MemoryRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.MemoryRouter.html) A declarative [``](../declarative-routers/Router) that stores all entries in memory. diff --git a/docs/api/declarative-routers/Router.md b/docs/api/declarative-routers/Router.md index 82985b4ced..8deecb412c 100644 --- a/docs/api/declarative-routers/Router.md +++ b/docs/api/declarative-routers/Router.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.Router.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.Router.html) Provides location context for the rest of the app. @@ -55,7 +55,7 @@ Nested [`Route`](../components/Route) elements describing the route tree ### location The location to match against. Defaults to the current location. -This can be a string or a [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) object. +This can be a string or a [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) object. ### navigationType @@ -65,7 +65,7 @@ Defaults to `NavigationType.Pop`. ### navigator The navigator to use for navigation. This is usually a history object -or a custom navigator that implements the [`Navigator`](https://api.reactrouter.com/v7/interfaces/react_router.Navigator.html) interface. +or a custom navigator that implements the [`Navigator`](https://api.reactrouter.com/v7/interfaces/react-router.Navigator.html) interface. ### static diff --git a/docs/api/declarative-routers/StaticRouter.md b/docs/api/declarative-routers/StaticRouter.md index b7f81300e3..2ffc3595a3 100644 --- a/docs/api/declarative-routers/StaticRouter.md +++ b/docs/api/declarative-routers/StaticRouter.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.StaticRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.StaticRouter.html) -A [``](../declarative-routers/Router) that may not navigate to any other [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html). +A [``](../declarative-routers/Router) that may not navigate to any other [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html). This is useful on the server where there is no stateful UI. ## Signature @@ -47,5 +47,5 @@ The child elements to render inside the static router ### location -The [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) to render the static router at (default: `/`) +The [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) to render the static router at (default: `/`) diff --git a/docs/api/framework-routers/ServerRouter.md b/docs/api/framework-routers/ServerRouter.md index 1710cbc378..61e6d58a08 100644 --- a/docs/api/framework-routers/ServerRouter.md +++ b/docs/api/framework-routers/ServerRouter.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.ServerRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.ServerRouter.html) The server entry point for a React Router app in Framework Mode. This component is used to generate the HTML in the response from the server. See diff --git a/docs/api/hooks/useActionData.md b/docs/api/hooks/useActionData.md index 764cb5f1a1..0093675fc6 100644 --- a/docs/api/hooks/useActionData.md +++ b/docs/api/hooks/useActionData.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useActionData.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useActionData.html) Returns the [`action`](../../start/framework/route-module#action) data from the most recent `POST` navigation form submission or `undefined` if there diff --git a/docs/api/hooks/useAsyncError.md b/docs/api/hooks/useAsyncError.md index 77e0d34762..f1569b4d65 100644 --- a/docs/api/hooks/useAsyncError.md +++ b/docs/api/hooks/useAsyncError.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useAsyncError.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useAsyncError.html) Returns the rejection value from the closest [``](../components/Await). diff --git a/docs/api/hooks/useAsyncValue.md b/docs/api/hooks/useAsyncValue.md index c6f15663a1..6b0cef859e 100644 --- a/docs/api/hooks/useAsyncValue.md +++ b/docs/api/hooks/useAsyncValue.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useAsyncValue.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useAsyncValue.html) Returns the resolved promise value from the closest [``](../components/Await). diff --git a/docs/api/hooks/useBeforeUnload.md b/docs/api/hooks/useBeforeUnload.md index dc43799cd1..2b050edbc8 100644 --- a/docs/api/hooks/useBeforeUnload.md +++ b/docs/api/hooks/useBeforeUnload.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useBeforeUnload.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useBeforeUnload.html) Set up a callback to be fired on [Window's `beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event). diff --git a/docs/api/hooks/useBlocker.md b/docs/api/hooks/useBlocker.md index cf9945fab4..5a47c421e7 100644 --- a/docs/api/hooks/useBlocker.md +++ b/docs/api/hooks/useBlocker.md @@ -20,21 +20,21 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useBlocker.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useBlocker.html) Allow the application to block navigations within the SPA and present the user a confirmation dialog to confirm the navigation. Mostly used to avoid using half-filled form data. This does not handle hard-reloads or cross-origin navigations. -The [`Blocker`](https://api.reactrouter.com/v7/types/react_router.Blocker.html) object returned by the hook has the following properties: +The [`Blocker`](https://api.reactrouter.com/v7/types/react-router.Blocker.html) object returned by the hook has the following properties: - **`state`** - `unblocked` - the blocker is idle and has not prevented any navigation - `blocked` - the blocker has prevented a navigation - `proceeding` - the blocker is proceeding through from a blocked navigation - **`location`** - - When in a `blocked` state, this represents the [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) to which + - When in a `blocked` state, this represents the [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) to which we blocked a navigation. When in a `proceeding` state, this is the location being navigated to after a `blocker.proceed()` call. - **`proceed()`** @@ -73,7 +73,7 @@ receives a single object parameter containing the `currentLocation`, ## Returns -A [`Blocker`](https://api.reactrouter.com/v7/types/react_router.Blocker.html) object with state and reset functionality +A [`Blocker`](https://api.reactrouter.com/v7/types/react-router.Blocker.html) object with state and reset functionality ## Examples diff --git a/docs/api/hooks/useFetcher.md b/docs/api/hooks/useFetcher.md index 374cddc8bd..425195b93c 100644 --- a/docs/api/hooks/useFetcher.md +++ b/docs/api/hooks/useFetcher.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useFetcher.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useFetcher.html) Useful for creating complex, dynamic user interfaces that require multiple, concurrent data interactions without causing a navigation. @@ -93,5 +93,5 @@ function AnotherComp() { ## Returns -A [`FetcherWithComponents`](https://api.reactrouter.com/v7/types/react_router.FetcherWithComponents.html) object that contains the fetcher's state, data, and components for submitting forms and loading data. +A [`FetcherWithComponents`](https://api.reactrouter.com/v7/types/react-router.FetcherWithComponents.html) object that contains the fetcher's state, data, and components for submitting forms and loading data. diff --git a/docs/api/hooks/useFetchers.md b/docs/api/hooks/useFetchers.md index 3cd5a3544f..fa8ef87698 100644 --- a/docs/api/hooks/useFetchers.md +++ b/docs/api/hooks/useFetchers.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useFetchers.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useFetchers.html) -Returns an array of all in-flight [`Fetcher`](https://api.reactrouter.com/v7/types/react_router.Fetcher.html)s. This is useful for components +Returns an array of all in-flight [`Fetcher`](https://api.reactrouter.com/v7/types/react-router.Fetcher.html)s. This is useful for components throughout the app that didn't create the fetchers but want to use their submissions to participate in optimistic UI. @@ -47,6 +47,6 @@ function useFetchers(): (Fetcher & { ## Returns -An array of all in-flight [`Fetcher`](https://api.reactrouter.com/v7/types/react_router.Fetcher.html)s, each with a unique `key` +An array of all in-flight [`Fetcher`](https://api.reactrouter.com/v7/types/react-router.Fetcher.html)s, each with a unique `key` property. diff --git a/docs/api/hooks/useFormAction.md b/docs/api/hooks/useFormAction.md index 46d2627468..7ffaf6711c 100644 --- a/docs/api/hooks/useFormAction.md +++ b/docs/api/hooks/useFormAction.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useFormAction.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useFormAction.html) Resolves the URL to the closest route in the component hierarchy instead of the current URL of the app. diff --git a/docs/api/hooks/useHref.md b/docs/api/hooks/useHref.md index 51d5458b54..35a52c6515 100644 --- a/docs/api/hooks/useHref.md +++ b/docs/api/hooks/useHref.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useHref.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useHref.html) -Resolves a URL against the current [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html). +Resolves a URL against the current [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html). ```tsx import { useHref } from "react-router"; diff --git a/docs/api/hooks/useInRouterContext.md b/docs/api/hooks/useInRouterContext.md index ef7d4edf42..dcf163e7c6 100644 --- a/docs/api/hooks/useInRouterContext.md +++ b/docs/api/hooks/useInRouterContext.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useInRouterContext.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useInRouterContext.html) Returns `true` if this component is a descendant of a [`Router`](../declarative-routers/Router), useful to ensure a component is used within a [`Router`](../declarative-routers/Router). diff --git a/docs/api/hooks/useLinkClickHandler.md b/docs/api/hooks/useLinkClickHandler.md index 27068dd645..6a55958b9b 100644 --- a/docs/api/hooks/useLinkClickHandler.md +++ b/docs/api/hooks/useLinkClickHandler.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useLinkClickHandler.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useLinkClickHandler.html) Handles the click behavior for router [``](../components/Link) components.This is useful if you need to create custom [``](../components/Link) components with @@ -57,7 +57,7 @@ function useLinkClickHandler( ### to -The URL to navigate to, can be a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html). +The URL to navigate to, can be a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html). ### options.preventScrollReset @@ -66,7 +66,7 @@ using the [`ScrollRestoration`](../components/ScrollRestoration) component. Defa ### options.relative -The [relative routing type](https://api.reactrouter.com/v7/types/react_router.RelativeRoutingType.html) to use for the link. Defaults to `"route"`. +The [relative routing type](https://api.reactrouter.com/v7/types/react-router.RelativeRoutingType.html) to use for the link. Defaults to `"route"`. ### options.replace diff --git a/docs/api/hooks/useLoaderData.md b/docs/api/hooks/useLoaderData.md index fdbd4a01ff..0d04fa9093 100644 --- a/docs/api/hooks/useLoaderData.md +++ b/docs/api/hooks/useLoaderData.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useLoaderData.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useLoaderData.html) Returns the data from the closest route [`loader`](../../start/framework/route-module#loader) or diff --git a/docs/api/hooks/useLocation.md b/docs/api/hooks/useLocation.md index d9d46f05fd..d2c4ca04cc 100644 --- a/docs/api/hooks/useLocation.md +++ b/docs/api/hooks/useLocation.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useLocation.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useLocation.html) -Returns the current [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html). This can be useful if you'd like to +Returns the current [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html). This can be useful if you'd like to perform some side effect whenever it changes. ```tsx @@ -51,5 +51,5 @@ function useLocation(): Location ## Returns -The current [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) object +The current [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) object diff --git a/docs/api/hooks/useMatch.md b/docs/api/hooks/useMatch.md index bd59777fa6..dad84bdc87 100644 --- a/docs/api/hooks/useMatch.md +++ b/docs/api/hooks/useMatch.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useMatch.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useMatch.html) -Returns a [`PathMatch`](https://api.reactrouter.com/v7/interfaces/react_router.PathMatch.html) object if the given pattern matches the current URL. +Returns a [`PathMatch`](https://api.reactrouter.com/v7/interfaces/react-router.PathMatch.html) object if the given pattern matches the current URL. This is useful for components that need to know "active" state, e.g. [``](../components/NavLink). @@ -38,7 +38,7 @@ function useMatch, Path extends string>( ### pattern -The pattern to match against the current [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) +The pattern to match against the current [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) ## Returns diff --git a/docs/api/hooks/useMatches.md b/docs/api/hooks/useMatches.md index fc5391e702..78357c3298 100644 --- a/docs/api/hooks/useMatches.md +++ b/docs/api/hooks/useMatches.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useMatches.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useMatches.html) Returns the active route matches, useful for accessing `loaderData` for parent/child routes or the route [`handle`](../../start/framework/route-module#handle) @@ -34,5 +34,5 @@ function useMatches(): UIMatch[] ## Returns -An array of [UI matches](https://api.reactrouter.com/v7/interfaces/react_router.UIMatch.html) for the current route hierarchy +An array of [UI matches](https://api.reactrouter.com/v7/interfaces/react-router.UIMatch.html) for the current route hierarchy diff --git a/docs/api/hooks/useNavigate.md b/docs/api/hooks/useNavigate.md index d8a75751bd..83aee981a3 100644 --- a/docs/api/hooks/useNavigate.md +++ b/docs/api/hooks/useNavigate.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useNavigate.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useNavigate.html) Returns a function that lets you navigate programmatically in the browser in response to user interactions or effects. @@ -30,12 +30,12 @@ functions than this hook. The returned function signature is `navigate(to, options?)`/`navigate(delta)` where: -* `to` can be a string path, a [`To`](https://api.reactrouter.com/v7/types/react_router.To.html) object, or a number (delta) +* `to` can be a string path, a [`To`](https://api.reactrouter.com/v7/types/react-router.To.html) object, or a number (delta) * `options` contains options for modifying the navigation * These options work in all modes (Framework, Data, and Declarative): * `relative`: `"route"` or `"path"` to control relative routing logic * `replace`: Replace the current entry in the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack - * `state`: Optional [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state) to include with the new [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) + * `state`: Optional [`history.state`](https://developer.mozilla.org/en-US/docs/Web/API/History/state) to include with the new [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) * These options only work in Framework and Data modes: * `flushSync`: Wrap the DOM updates in [`ReactDom.flushSync`](https://react.dev/reference/react-dom/flushSync) * `preventScrollReset`: Do not scroll back to the top of the page after navigation @@ -73,7 +73,7 @@ navigate("/some/route"); navigate("/some/route?search=param"); ``` -### Navigate with a [`To`](https://api.reactrouter.com/v7/types/react_router.To.html) object +### Navigate with a [`To`](https://api.reactrouter.com/v7/types/react-router.To.html) object All properties are optional. @@ -86,7 +86,7 @@ navigate({ }); ``` -If you use `state`, that will be available on the [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) object on +If you use `state`, that will be available on the [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) object on the next page. Access it with `useLocation().state` (see [`useLocation`](../hooks/useLocation)). ### Navigate back or forward in the history stack @@ -103,7 +103,7 @@ navigate(1); Be cautious with `navigate(number)`. If your application can load up to a route that has a button that tries to navigate forward/back, there may not be -a [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) +a `[`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) entry to go back or forward to, or it can go somewhere you don't expect (like a different domain). diff --git a/docs/api/hooks/useNavigation.md b/docs/api/hooks/useNavigation.md index 485ae734b0..011b125afe 100644 --- a/docs/api/hooks/useNavigation.md +++ b/docs/api/hooks/useNavigation.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useNavigation.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useNavigation.html) -Returns the current [`Navigation`](https://api.reactrouter.com/v7/types/react_router.Navigation.html), defaulting to an "idle" navigation +Returns the current [`Navigation`](https://api.reactrouter.com/v7/types/react-router.Navigation.html), defaulting to an "idle" navigation when no navigation is in progress. You can use this to render pending UI (like a global spinner) or read [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData) from a form navigation. @@ -46,5 +46,5 @@ function useNavigation(): Navigation ## Returns -The current [`Navigation`](https://api.reactrouter.com/v7/types/react_router.Navigation.html) object +The current [`Navigation`](https://api.reactrouter.com/v7/types/react-router.Navigation.html) object diff --git a/docs/api/hooks/useNavigationType.md b/docs/api/hooks/useNavigationType.md index 2a29b8084d..12fd04cae5 100644 --- a/docs/api/hooks/useNavigationType.md +++ b/docs/api/hooks/useNavigationType.md @@ -20,10 +20,10 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useNavigationType.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useNavigationType.html) -Returns the current [`Navigation`](https://api.reactrouter.com/v7/types/react_router.Navigation.html) action which describes how the router -came to the current [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html), either by a pop, push, or replace on +Returns the current [`Navigation`](https://api.reactrouter.com/v7/types/react-router.Navigation.html) action which describes how the router +came to the current [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html), either by a pop, push, or replace on the [`History`](https://developer.mozilla.org/en-US/docs/Web/API/History) stack. ## Signature @@ -34,5 +34,5 @@ function useNavigationType(): NavigationType ## Returns -The current [`NavigationType`](https://api.reactrouter.com/v7/enums/react_router.NavigationType.html) (`"POP"`, `"PUSH"`, or `"REPLACE"`) +The current [`NavigationType`](https://api.reactrouter.com/v7/enums/react-router.NavigationType.html) (`"POP"`, `"PUSH"`, or `"REPLACE"`) diff --git a/docs/api/hooks/useOutlet.md b/docs/api/hooks/useOutlet.md index 8601fc504a..f2826dcc58 100644 --- a/docs/api/hooks/useOutlet.md +++ b/docs/api/hooks/useOutlet.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useOutlet.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useOutlet.html) Returns the element for the child route at this level of the route hierarchy. Used internally by [``](../components/Outlet) to render child diff --git a/docs/api/hooks/useOutletContext.md b/docs/api/hooks/useOutletContext.md index f7395cc7f3..35a7c15675 100644 --- a/docs/api/hooks/useOutletContext.md +++ b/docs/api/hooks/useOutletContext.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useOutletContext.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useOutletContext.html) Returns the parent route [``](../components/Outlet). diff --git a/docs/api/hooks/useParams.md b/docs/api/hooks/useParams.md index fd5eea146e..4e143c3a70 100644 --- a/docs/api/hooks/useParams.md +++ b/docs/api/hooks/useParams.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useParams.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useParams.html) Returns an object of key/value-pairs of the dynamic params from the current URL that were matched by the routes. Child routes inherit all params from diff --git a/docs/api/hooks/usePrompt.md b/docs/api/hooks/usePrompt.md index 8ce621a0cc..7ac11f0d4b 100644 --- a/docs/api/hooks/usePrompt.md +++ b/docs/api/hooks/usePrompt.md @@ -28,7 +28,7 @@ to release notes for relevant changes. ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.unstable_usePrompt.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.unstable_usePrompt.html) Wrapper around [`useBlocker`](../hooks/useBlocker) to show a [`window.confirm`](https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm) prompt to users instead of building a custom UI with [`useBlocker`](../hooks/useBlocker). diff --git a/docs/api/hooks/useResolvedPath.md b/docs/api/hooks/useResolvedPath.md index bdd64b3563..268efc8c96 100644 --- a/docs/api/hooks/useResolvedPath.md +++ b/docs/api/hooks/useResolvedPath.md @@ -20,11 +20,11 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useResolvedPath.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useResolvedPath.html) Resolves the pathname of the given `to` value against the current -[`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html). Similar to [`useHref`](../hooks/useHref), but returns a -[`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html) instead of a string. +[`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html). Similar to [`useHref`](../hooks/useHref), but returns a +[`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html) instead of a string. ```tsx import { useResolvedPath } from "react-router"; @@ -63,5 +63,5 @@ Defaults to `"route"` so routing is relative to the route tree. ## Returns -The resolved [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html) object with `pathname`, `search`, and `hash` +The resolved [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html) object with `pathname`, `search`, and `hash` diff --git a/docs/api/hooks/useRevalidator.md b/docs/api/hooks/useRevalidator.md index f37a1b29be..bfd87f622a 100644 --- a/docs/api/hooks/useRevalidator.md +++ b/docs/api/hooks/useRevalidator.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useRevalidator.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useRevalidator.html) Revalidate the data on the page for reasons outside of normal data mutations like [`Window` focus](https://developer.mozilla.org/en-US/docs/Web/API/Window/focus_event) diff --git a/docs/api/hooks/useRouteError.md b/docs/api/hooks/useRouteError.md index 861a3fb98a..07026f1cf4 100644 --- a/docs/api/hooks/useRouteError.md +++ b/docs/api/hooks/useRouteError.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useRouteError.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useRouteError.html) Accesses the error thrown during an [`action`](../../start/framework/route-module#action), diff --git a/docs/api/hooks/useRouteLoaderData.md b/docs/api/hooks/useRouteLoaderData.md index b700496746..ce59b69161 100644 --- a/docs/api/hooks/useRouteLoaderData.md +++ b/docs/api/hooks/useRouteLoaderData.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useRouteLoaderData.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useRouteLoaderData.html) Returns the [`loader`](../../start/framework/route-module#loader) data for a given route by route ID. diff --git a/docs/api/hooks/useRoutes.md b/docs/api/hooks/useRoutes.md index 5bc71198ab..ca7d74dabd 100644 --- a/docs/api/hooks/useRoutes.md +++ b/docs/api/hooks/useRoutes.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ho ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useRoutes.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useRoutes.html) Hook version of [``](../components/Routes) that uses objects instead of components. These objects have the same properties as the component props. @@ -63,11 +63,11 @@ function useRoutes( ### routes -An array of [`RouteObject`](https://api.reactrouter.com/v7/types/react_router.RouteObject.html)s that define the route hierarchy +An array of [`RouteObject`](https://api.reactrouter.com/v7/types/react-router.RouteObject.html)s that define the route hierarchy ### locationArg -An optional [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) object or pathname string to use instead of the current [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) +An optional [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) object or pathname string to use instead of the current [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) ## Returns diff --git a/docs/api/hooks/useSearchParams.md b/docs/api/hooks/useSearchParams.md index e5d7a676f2..3a96e7f63b 100644 --- a/docs/api/hooks/useSearchParams.md +++ b/docs/api/hooks/useSearchParams.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useSearchParams.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useSearchParams.html) Returns a tuple of the current URL's [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) and a function to update them. Setting the search params causes a navigation. diff --git a/docs/api/hooks/useSubmit.md b/docs/api/hooks/useSubmit.md index 5f4a5828d2..11d5c2c04c 100644 --- a/docs/api/hooks/useSubmit.md +++ b/docs/api/hooks/useSubmit.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useSubmit.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useSubmit.html) The imperative version of [``](../components/Form) that lets you submit a form from code instead of a user interaction. diff --git a/docs/api/hooks/useViewTransitionState.md b/docs/api/hooks/useViewTransitionState.md index 9f01a156ee..9c14c50694 100644 --- a/docs/api/hooks/useViewTransitionState.md +++ b/docs/api/hooks/useViewTransitionState.md @@ -20,12 +20,12 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.useViewTransitionState.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.useViewTransitionState.html) This hook returns `true` when there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API) to the specified location. This can be used to apply finer-grained styles to elements to further customize the view transition. This requires that view -transitions have been enabled for the given navigation via [`LinkProps.viewTransition`](https://api.reactrouter.com/v7/interfaces/react_router.LinkProps.html#viewTransition) +transitions have been enabled for the given navigation via [`LinkProps.viewTransition`](https://api.reactrouter.com/v7/interfaces/react-router.LinkProps.html#viewTransition) (or the `Form`, `submit`, or `navigate` call) ## Signature @@ -45,15 +45,15 @@ function useViewTransitionState( ### to -The [`To`](https://api.reactrouter.com/v7/types/react_router.To.html) location to check for an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API). +The [`To`](https://api.reactrouter.com/v7/types/react-router.To.html) location to check for an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API). ### options.relative -The relative routing type to use when resolving the `to` location, defaults to `"route"`. See [`RelativeRoutingType`](https://api.reactrouter.com/v7/types/react_router.RelativeRoutingType.html) for +The relative routing type to use when resolving the `to` location, defaults to `"route"`. See [`RelativeRoutingType`](https://api.reactrouter.com/v7/types/react-router.RelativeRoutingType.html) for more details. ## Returns `true` if there is an active [View Transition](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API) -to the specified [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html), otherwise `false`. +to the specified [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html), otherwise `false`. diff --git a/docs/api/rsc/RSCHydratedRouter.md b/docs/api/rsc/RSCHydratedRouter.md index 2882749a75..1c4f15239c 100644 --- a/docs/api/rsc/RSCHydratedRouter.md +++ b/docs/api/rsc/RSCHydratedRouter.md @@ -28,7 +28,7 @@ to release notes for relevant changes. ## Summary -Hydrates a server rendered [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html) in the browser. +Hydrates a server rendered [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html) in the browser. ```tsx import { startTransition, StrictMode } from "react"; @@ -88,7 +88,7 @@ navigation or fetcher call. ### payload -The decoded [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html) to hydrate. +The decoded [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html) to hydrate. ### routeDiscovery diff --git a/docs/api/rsc/RSCStaticRouter.md b/docs/api/rsc/RSCStaticRouter.md index 395df3ba1f..e771d881a1 100644 --- a/docs/api/rsc/RSCStaticRouter.md +++ b/docs/api/rsc/RSCStaticRouter.md @@ -28,9 +28,9 @@ to release notes for relevant changes. ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.unstable_RSCStaticRouter.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.unstable_RSCStaticRouter.html) -Pre-renders an [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html) to HTML. Usually used in +Pre-renders an [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html) to HTML. Usually used in [`unstable_routeRSCServerRequest`](../rsc/routeRSCServerRequest)'s `renderHTML` callback. ```tsx @@ -69,6 +69,6 @@ function RSCStaticRouter({ getPayload }: RSCStaticRouterProps) ### getPayload -A function that starts decoding of the [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html). Usually passed +A function that starts decoding of the [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html). Usually passed through from [`unstable_routeRSCServerRequest`](../rsc/routeRSCServerRequest)'s `renderHTML`. diff --git a/docs/api/rsc/matchRSCServerRequest.md b/docs/api/rsc/matchRSCServerRequest.md index 2fbed41c7d..cd78bba518 100644 --- a/docs/api/rsc/matchRSCServerRequest.md +++ b/docs/api/rsc/matchRSCServerRequest.md @@ -28,12 +28,12 @@ to release notes for relevant changes. ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/variables/react_router.unstable_matchRSCServerRequest.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/variables/react-router.unstable_matchRSCServerRequest.html) Matches the given routes to a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) and returns an [RSC](https://react.dev/reference/rsc/server-components) [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) -encoding an [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html) for consumption by an [RSC](https://react.dev/reference/rsc/server-components) +encoding an [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html) for consumption by an [RSC](https://react.dev/reference/rsc/server-components) enabled client router. ```tsx @@ -139,7 +139,7 @@ implementation for invocation by the router. ### opts.generateResponse A function responsible for using your `renderToReadableStream` to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) -encoding the [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html). +encoding the [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html). ### opts.loadServerAction @@ -160,7 +160,7 @@ An instance of [`RouterContextProvider`](../utils/RouterContextProvider) that sh ### opts.routes -Your [route definitions](https://api.reactrouter.com/v7/types/react_router.unstable_RSCRouteConfigEntry.html). +Your [route definitions](https://api.reactrouter.com/v7/types/react-router.unstable_RSCRouteConfigEntry.html). ## Returns diff --git a/docs/api/rsc/routeRSCServerRequest.md b/docs/api/rsc/routeRSCServerRequest.md index cbf072010e..edca45f9b2 100644 --- a/docs/api/rsc/routeRSCServerRequest.md +++ b/docs/api/rsc/routeRSCServerRequest.md @@ -28,7 +28,7 @@ to release notes for relevant changes. ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.unstable_routeRSCServerRequest.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.unstable_routeRSCServerRequest.html) Routes the incoming [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) to the [RSC](https://react.dev/reference/rsc/server-components) server and @@ -93,7 +93,7 @@ Your `react-server-dom-xyz/client`'s `createFromReadableStream` function, used t ### opts.serverResponse -A Response or partial response generated by the [RSC](https://react.dev/reference/rsc/server-components) handler containing a serialized [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html). +A Response or partial response generated by the [RSC](https://react.dev/reference/rsc/server-components) handler containing a serialized [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html). ### opts.hydrate @@ -101,7 +101,7 @@ Whether to hydrate the server response with the RSC payload. Defaults to `true`. ### opts.renderHTML -A function that renders the [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react_router.unstable_RSCPayload.html) to HTML, usually using a [``](../rsc/RSCStaticRouter). +A function that renders the [`unstable_RSCPayload`](https://api.reactrouter.com/v7/types/react-router.unstable_RSCPayload.html) to HTML, usually using a [``](../rsc/RSCStaticRouter). ### opts.request diff --git a/docs/api/utils/RouterContextProvider.md b/docs/api/utils/RouterContextProvider.md index d529ad5afa..71ca03f190 100644 --- a/docs/api/utils/RouterContextProvider.md +++ b/docs/api/utils/RouterContextProvider.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/classes/react_router.RouterContextProvider.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/classes/react-router.RouterContextProvider.html) Provides methods for writing/reading values in application context in a type-safe way. Primarily for usage with [middleware](../../how-to/middleware). diff --git a/docs/api/utils/createContext.md b/docs/api/utils/createContext.md index 5a5b9081a9..6849643dfc 100644 --- a/docs/api/utils/createContext.md +++ b/docs/api/utils/createContext.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.createContext.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.createContext.html) -Creates a type-safe [`RouterContext`](https://api.reactrouter.com/v7/interfaces/react_router.RouterContext.html) object that can be used to +Creates a type-safe [`RouterContext`](https://api.reactrouter.com/v7/interfaces/react-router.RouterContext.html) object that can be used to store and retrieve arbitrary values in [`action`](../../start/framework/route-module#action)s, [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware). Similar to React's [`createContext`](https://react.dev/reference/react/createContext), @@ -83,7 +83,7 @@ An optional default value for the context. This value will be returned if no val ## Returns -A [`RouterContext`](https://api.reactrouter.com/v7/interfaces/react_router.RouterContext.html) object that can be used with +A [`RouterContext`](https://api.reactrouter.com/v7/interfaces/react-router.RouterContext.html) object that can be used with `context.get()` and `context.set()` in [`action`](../../start/framework/route-module#action)s, [`loader`](../../start/framework/route-module#loader)s, and [middleware](../../how-to/middleware). diff --git a/docs/api/utils/createRoutesFromElements.md b/docs/api/utils/createRoutesFromElements.md index 84698670e6..fb05580ed2 100644 --- a/docs/api/utils/createRoutesFromElements.md +++ b/docs/api/utils/createRoutesFromElements.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.createRoutesFromElements.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.createRoutesFromElements.html) Create route objects from JSX elements instead of arrays of objects. @@ -53,5 +53,5 @@ application developer. ## Returns -An array of [`RouteObject`](https://api.reactrouter.com/v7/types/react_router.RouteObject.html)s that can be used with a [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) +An array of [`RouteObject`](https://api.reactrouter.com/v7/types/react-router.RouteObject.html)s that can be used with a [`DataRouter`](https://api.reactrouter.com/v7/interfaces/react-router.DataRouter.html) diff --git a/docs/api/utils/data.md b/docs/api/utils/data.md index 8e2d49d910..e9bbbda6bb 100644 --- a/docs/api/utils/data.md +++ b/docs/api/utils/data.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.data.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.data.html) Create "responses" that contain `headers`/`status` without forcing serialization into an actual [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) diff --git a/docs/api/utils/generatePath.md b/docs/api/utils/generatePath.md index 9b2e98bd7c..489f76de84 100644 --- a/docs/api/utils/generatePath.md +++ b/docs/api/utils/generatePath.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.generatePath.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.generatePath.html) Returns a path with params interpolated. diff --git a/docs/api/utils/isRouteErrorResponse.md b/docs/api/utils/isRouteErrorResponse.md index 8a2a1e69e1..ca8d61f3a1 100644 --- a/docs/api/utils/isRouteErrorResponse.md +++ b/docs/api/utils/isRouteErrorResponse.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.isRouteErrorResponse.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.isRouteErrorResponse.html) -Check if the given error is an [`ErrorResponse`](https://api.reactrouter.com/v7/types/react_router.ErrorResponse.html) generated from a 4xx/5xx +Check if the given error is an [`ErrorResponse`](https://api.reactrouter.com/v7/types/react-router.ErrorResponse.html) generated from a 4xx/5xx [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) thrown from an [`action`](../../start/framework/route-module#action) or [`loader`](../../start/framework/route-module#loader) function. @@ -60,5 +60,5 @@ The error to check. ## Returns -`true` if the error is an [`ErrorResponse`](https://api.reactrouter.com/v7/types/react_router.ErrorResponse.html), `false` otherwise. +`true` if the error is an [`ErrorResponse`](https://api.reactrouter.com/v7/types/react-router.ErrorResponse.html), `false` otherwise. diff --git a/docs/api/utils/matchPath.md b/docs/api/utils/matchPath.md index 24c0377492..13018d6b7b 100644 --- a/docs/api/utils/matchPath.md +++ b/docs/api/utils/matchPath.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.matchPath.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.matchPath.html) Performs pattern matching on a URL pathname and returns information about the match. @@ -38,7 +38,7 @@ function matchPath, Path extends string>( ### pattern -The pattern to match against the URL pathname. This can be a string or a [`PathPattern`](https://api.reactrouter.com/v7/interfaces/react_router.PathPattern.html) object. If a string is provided, it will be +The pattern to match against the URL pathname. This can be a string or a [`PathPattern`](https://api.reactrouter.com/v7/interfaces/react-router.PathPattern.html) object. If a string is provided, it will be treated as a pattern with `caseSensitive` set to `false` and `end` set to `true`. diff --git a/docs/api/utils/matchRoutes.md b/docs/api/utils/matchRoutes.md index 8bdaad062e..6fd028649b 100644 --- a/docs/api/utils/matchRoutes.md +++ b/docs/api/utils/matchRoutes.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.matchRoutes.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.matchRoutes.html) Matches the given routes to a location and returns the match data. @@ -59,7 +59,7 @@ The array of route objects to match against. ### locationArg -The location to match against, either a string path or a partial [`Location`](https://api.reactrouter.com/v7/interfaces/react_router.Location.html) object +The location to match against, either a string path or a partial [`Location`](https://api.reactrouter.com/v7/interfaces/react-router.Location.html) object ### basename diff --git a/docs/api/utils/redirect.md b/docs/api/utils/redirect.md index 6c76e9790d..adea0cb254 100644 --- a/docs/api/utils/redirect.md +++ b/docs/api/utils/redirect.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.redirect.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.redirect.html) A redirect [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response). Sets the status code and the [`Location`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location) diff --git a/docs/api/utils/redirectDocument.md b/docs/api/utils/redirectDocument.md index 184b03d436..b985d5d228 100644 --- a/docs/api/utils/redirectDocument.md +++ b/docs/api/utils/redirectDocument.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.redirectDocument.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.redirectDocument.html) A redirect [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) that will force a document reload to the new location. Sets the status code diff --git a/docs/api/utils/renderMatches.md b/docs/api/utils/renderMatches.md index a3544c5fbf..f88815ac7a 100644 --- a/docs/api/utils/renderMatches.md +++ b/docs/api/utils/renderMatches.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/co ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.renderMatches.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.renderMatches.html) Renders the result of [`matchRoutes`](../utils/matchRoutes) into a React element. @@ -36,7 +36,7 @@ function renderMatches( ### matches -The array of [route matches](https://api.reactrouter.com/v7/interfaces/react_router.RouteMatch.html) to render +The array of [route matches](https://api.reactrouter.com/v7/interfaces/react-router.RouteMatch.html) to render ## Returns diff --git a/docs/api/utils/replace.md b/docs/api/utils/replace.md index 4adbe05cd0..5f6285dfdb 100644 --- a/docs/api/utils/replace.md +++ b/docs/api/utils/replace.md @@ -20,7 +20,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.replace.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.replace.html) A redirect [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) that will perform a [`history.replaceState`](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState) diff --git a/docs/api/utils/resolvePath.md b/docs/api/utils/resolvePath.md index 5c552e7918..8b2e980ca7 100644 --- a/docs/api/utils/resolvePath.md +++ b/docs/api/utils/resolvePath.md @@ -20,9 +20,9 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/ro ## Summary -[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.resolvePath.html) +[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.resolvePath.html) -Returns a resolved [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html) object relative to the given pathname. +Returns a resolved [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html) object relative to the given pathname. ## Signature @@ -34,7 +34,7 @@ function resolvePath(to: To, fromPathname = "/"): Path ### to -The path to resolve, either a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html) object. +The path to resolve, either a string or a partial [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html) object. ### fromPathname @@ -42,5 +42,5 @@ The pathname to resolve the path from. Defaults to `/`. ## Returns -A [`Path`](https://api.reactrouter.com/v7/interfaces/react_router.Path.html) object with the resolved pathname, search, and hash. +A [`Path`](https://api.reactrouter.com/v7/interfaces/react-router.Path.html) object with the resolved pathname, search, and hash.