You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An attacker-supplied path can be crafted so that when a React Router application navigates to it via navigate(), <Link>, or redirect(), the app performs a navigation/redirect to an external URL. This is only an issue if developers pass untrusted content into navigation paths in their application code.
Certain URLs passed to the redirect function can trigger an open redirect to an external domain depending on the level of validation done by the application prior to returning the redirect.
[!NOTE]
This does not impact your React Router application if you are using Declarative Mode (<BrowserRouter>)
If application code allows attacker supplied input to overwrite certain aspects of errors caught by the SSR process, then it was possible for attacker to trigger unexpected constructor execution on the client which would trigger outbound network traffic. This is only possible with very specific (and unlikely) application layer code.
[!NOTE]
This does not impact your application if you are using Declarative Mode. This only impacts Framework Mode and Data Mode applications doing manual SSR/hydration
This is a follow up to CVE-2025-68470. React Router was alerted to certain scenarios in which the fix there was incomplete so there still existed some scenarios where attacker supplied paths passed to navigation mechanisms could result in unexpected external navigations.
Fix server handler prerender responses when using ssr: false and future.v8_trailingSlashAwareDataRequests: true. Avoids false positive "SPA Mode" detection when serving prerendered paths (#15173)
Use the ServerRouter nonce for nonce-aware SSR components when they don't provide their own value so strict CSP pages can load them. (#15170)
Use turbo-stream to serialize and deserialize Framework Mode hydration errors (#15175)
Precompute route branch matchers to avoid recompiling route path regexes during matching (#15186)
Use the constructed request URL host when validating action request origins. (#15185)
Remove the un-documented custom error serialization logic from Data Mode SSR built-in hydration flows (#15175)
Validate protocols in RSC render redirects (#15177)
Consolidate url normalization logic and better handle mixed slashes (#15176)
Ship a subset of the official documentation inside the react-router package (#15121)
Markdown docs are now available in node_modules/react-router/docs, letting AI coding agents and the React Router agent skills read official docs locally
Excludes auto-generated API docs (api/), community/ content, and tutorials (tutorials/)
Stabilize future.unstable_trailingSlashAwareDataRequests as future.v8_trailingSlashAwareDataRequests (#15098)
Patch Changes
Disable manifest path when lazy route dicovery is disabled (#15068)
Fix browser URL creation to use the configured history window instead of the global window. (#15066)
Pass the history/router window through to createBrowserURLImpl so custom window contexts keep the correct URL origin.
Fix useNavigation() return type to preserve discriminated union across navigation states (#15095)
Widen MetaDescriptorscript:ld+json type from LdJsonObject to LdJsonObject | LdJsonObject[] to permit multiple JSON-LD schemas in a single <script type="application/ld+json"> tag emitted by <Meta /> (#15082)
Update router to operate on fetcher Maps in an immutable manner to avoid delayed React renders from potentially reading an updated but not yet committed Map. This could result in brief flickers in some fetcher-driven optimistic UI scenarios. (#15028)
Fix serverLoader() returning stale SSR data when a client navigation aborts pending hydration before the hydration clientLoader resolves (#15022)
Fix RouterProvideronError callback not being called for synchronous initial loader errors in SPA mode (#15039) (#14942)
Memoize useFetchers to return a stable identity and only change if fetchers changed (#15028)
Internal refactor to consolidate mutation request detection through shared utility (#15033)
Add a new unstable_useRouterState() hook that consolidates access to active and pending router states (RFC: #12358) (#15017)
Data/Framework/RSC only — throws when used without a data router
This should allow you to consolidate usages of the following hooks which will likely be deprecated and removed in a future major version
useLocation
useSearchParams
useParams
useMatches
useNavigationType
useNavigation
let{ active, pending }=unstable_useRouterState();// Active is always populated with the current locationactive.location;// replaces `useLocation()`active.searchParams;// replaces `useSearchParams()[0]`active.params;// replaces `useParams()`active.matches;// replaces `useMatches()`active.type;// replaces `useNavigationType()`// Pending is only populated during a navigationpending.location;// replaces `useNavigation().location`pending.searchParams;// equivalent to `new URLSearchParams(useNavigation().search)`pending.params;// Not directly accessible todaypending.matches;// Not directly accessible todaypending.type;// Not directly accessible todaypending.state;// replaces `useNavigation().state`pending.formMethod;// replaces useNavigation().formMethodpending.formAction;// replaces useNavigation().formActionpending.formEncType;// replaces useNavigation().formEncTypepending.formData;// replaces useNavigation().formDatapending.json;// replaces useNavigation().jsonpending.text;// replaces useNavigation().text
Stabilize unstable_defaultShouldRevalidate as defaultShouldRevalidate on <Link>, <Form>, useLinkClickHandler, useSubmit, fetcher.submit, and setSearchParams (a993f09)
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize the instrumentation APIs. unstable_instrumentations is now instrumentations and unstable_pattern is now pattern (a993f09)
The unstable_ServerInstrumentation, unstable_ClientInstrumentation, unstable_InstrumentRequestHandlerFunction, unstable_InstrumentRouterFunction, unstable_InstrumentRouteFunction, and unstable_InstrumentationHandlerResult types have had their unstable_ prefixes removed
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize unstable_mask as mask on <Link>, useLinkClickHandler, and useNavigate, and rename the corresponding Location.unstable_mask field to Location.mask (a993f09)
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize the unstable_normalizePath option on staticHandler.query and staticHandler.queryRoute as normalizePath (a993f09)
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize future.unstable_passThroughRequests as future.v8_passThroughRequests (a993f09)
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Remove unstable_subResourceIntegrity from the runtime FutureConfig type; the flag is now controlled by the top-level subResourceIntegrity option in react-router.config.ts (a993f09)
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize unstable_url as url on loader, action, and middleware function args (a993f09)
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Stabilize unstable_useTransitions as useTransitions on <BrowserRouter>, <HashRouter>, <HistoryRouter>, <MemoryRouter>, <Router>, <RouterProvider>, <HydratedRouter>, and useLinkClickHandler (a993f09)
⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
Patch Changes
Add nonce to <Scripts><link rel="modulepreload"> elements (if provided) (af5d49b)
Fix a bug with unstable_defaultShouldRevalidate={false} where parent routes that did not export a shouldRevalidate function could be incorrectly included in the single fetch call for new child route data (#15012)
Performance benchmarks showed roughly a 10-15% improvement in server-side request handling performance
Mark mask as an optional field in Location for easier mocking in unit tests (#14999)
Cache flattened/ranked route branches to optimize server-side route matching (#14967)
Improve route matching performance in Framework/Data Mode (#14971) (af5d49b)
Avoiding unnecessary calls to matchRoutes in data router scenarios
This includes adding back the optimization that was removed in 7.6.0 (#13562)
The issues that prompted the revert have been addressed by using the available router matches but always updating match.route to the latest route in the manifest
Leverage pre-computed pre-computing flattened/cached route branches during client side route matching
Performance benchmarks showed roughly a 15-30% improvement in server-side request handling performance
Remove the un-documented custom error serialization logic from the internal turbo-stream implementation. React Router only automatically handles serialization of Error and it's standard subtypes (SyntaxError, TypeError, etc.). ([aabf4a1)
Properly handle parent middleware redirects during fetcher.load ([aabf4a1)
Remove redundant Omit<RouterProviderProps, "flushSync"> from react-router/domRouterProvider ([aabf4a1)
Improved types for generatePath's param arg ([aabf4a1)
Type errors when required params are omitted:
// Before// Passes type checks, but throws at runtime 💥generatePath(":required",{required: null});// AftergeneratePath(":required",{required: null});// ^^^^^^^^ Type 'null' is not assignable to type 'string'.ts(2322)
Allow omission of optional params:
// BeforegeneratePath(":optional?",{});// ^^ Property 'optional' is missing in type '{}' but required in type '{ optional: string | null | undefined; }'.ts(2741)// AftergeneratePath(":optional?",{});
Allows extra keys:
// BeforegeneratePath(":a",{a: "1",b: "2"});// ^ Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'.ts(2353)// AftergeneratePath(":a",{a: "1",b: "2"});
Fix a potential race condition that can occur when rendering a HydrateFallback and initial loaders land before the router.subscribe call happens in the RouterProvider layout effect
UNSTABLE RSC FRAMEWORK MODE BREAKING CHANGE - Existing route module exports remain unchanged from stable v7 non-RSC mode, but new exports are added for RSC mode. If you want to use RSC features, you will need to update your route modules to export the new annotations. (#14901)
If you are using RSC framework mode currently, you will need to update your route modules to the new conventions. The following route module components have their own mutually exclusive server component counterparts:
Server Component Export
Client Component
ServerComponent
default
ServerErrorBoundary
ErrorBoundary
ServerLayout
Layout
ServerHydrateFallback
HydrateFallback
If you were previously exporting a ServerComponent, your ErrorBoundary, Layout, and HydrateFallback were also server components. If you want to keep those as server components, you can rename them and prefix them with Server. If you were previously importing the implementations of those components from a client module, you can simply inline them.
exportfunctionServerComponent(){// ...}exportfunctionErrorBoundary(){// previous implementation of ClientErrorBoundary, this is now a client component}exportfunctionServerLayout(){// rename previous Layout export to ServerLayout to make it a server component}exportfunctionServerHydrateFallback(){// rename previous HydrateFallback export to ServerHydrateFallback to make it a server component}
Fix clientLoader.hydrate when an ancestor route is also hydrating a clientLoader (#14835)
Fix type error when passing Framework Mode route components using Route.ComponentProps to createRoutesStub (#14892)
Fix percent encoding in relative path navigation (#14786)
Add future.unstable_passThroughRequests flag (#14775)
By default, React Router normalizes the request.url passed to your loader, action, and middleware functions by removing React Router's internal implementation details (.data suffixes, index + _routes query params).
Enabling this flag removes that normalization and passes the raw HTTP request instance to your handlers. This provides a few benefits:
Reduces server-side overhead by eliminating multiple new Request() calls on the critical path
Allows you to distinguish document from data requests in your handlers base don the presence of a .data suffix (useful for observability purposes)
If you were previously relying on the normalization of request.url, you can switch to use the new sibling unstable_url parameter which contains a URL instance representing the normalized location:
// ❌ Before: you could assume there was no `.data` suffix in `request.url`exportasyncfunctionloader({ request }: Route.LoaderArgs){leturl=newURL(request.url);if(url.pathname==="/path"){// This check will fail with the flag enabled because the `.data` suffix will// exist on data requests}}// ✅ After: use `unstable_url` for normalized routing logic and `request.url`// for raw routing logicexportasyncfunctionloader({ request, unstable_url }: Route.LoaderArgs){if(unstable_url.pathname==="/path"){// This will always have the `.data` suffix stripped}// And now you can distinguish between document versus data requestsletisDataRequest=newURL(request.url).pathname.endsWith(".data");}
Internal refactor to consolidate framework-agnostic/React-specific route type layers - no public API changes (#14765)
Add a new unstable_url: URL parameter to route handler methods (loader, action, middleware, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (.datasuffix, index/_routes query params) (#14775)
This is being added alongside the new future.unstable_passthroughRequests future flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalized request's are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization of request.url in your application code.
If you don't have the flag enabled, then unstable_url will match request.url.
Fix HydrateFallback rendering during initial lazy route discovery with matching splat route (#14740)
[UNSTABLE] Add support for <Link unstable_mask> in Data Mode which allows users to navigate to a URL in the router but "mask" the URL displayed in the browser. This is useful for contextual routing usages such as displaying an image in a model on top of a gallery, but displaying a browser URL directly to the image that can be shared and loaded without the contextual gallery in the background. (#14716)
// routes/gallery.tsxexportfunctionclientLoader({ request }: Route.LoaderArgs){letsp=newURL(request.url).searchParams;return{images: getImages(),// When the router location has the image param, load the modal datamodalImage: sp.has("image") ? getImage(sp.get("image")!) : null,};}exportdefaultfunctionGallery({ loaderData }: Route.ComponentProps){return(<><GalleryGrid>{loaderData.images.map((image)=>(<Linkkey={image.id}{/* Navigate the router to /galley?image=N */}}to={`/gallery?image=${image.id}`}{/* But display /images/N in the URL bar */}}unstable_mask={`/images/${image.id}`}><imgsrc={image.url}alt={image.alt}/></Link>))}</GalleryGrid>{/* When the modal data exists, display the modal */}{data.modalImage ? (<dialogopen><imgsrc={data.modalImage.url}alt={data.modalImage.alt}/></dialog>) : null}</>);}
Notes:
The masked location, if present, will be available on useLocation().unstable_mask so you can detect whether you are currently masked or not.
Masked URLs only work for SPA use cases, and will be removed from history.state during SSR.
This provides a first-class API to mask URLs in Data Mode to achieve the same behavior you could do in Declarative Mode via manual backgroundLocation management.
RSC: Update failed origin checks to return a 400 status and appropriate UI instead of a generic 500 (#14755)
Preserve query parameters and hash on manifest version mismatch reload (#14813)
Add additional layer of CSRF protection by rejecting submissions to UI routes from external origins. If you need to permit access to specific external origins, you can specify them in the react-router.config.ts config allowedActionOrigins field. (#14708)
Patch Changes
Fix generatePath when used with suffixed params (i.e., "/books/:id.json") (#14269)
Export UNSAFE_createMemoryHistory and UNSAFE_createHashHistory alongside UNSAFE_createBrowserHistory for consistency. These are not intended to be used for new apps but intended to help apps usiong unstable_HistoryRouter migrate from v6->v7 so they can adopt the newer APIs. (#14663)
[UNSTABLE] Pass <Scripts nonce> value through to the underlying importmapscript tag when using future.unstable_subResourceIntegrity (#14675)
[UNSTABLE] Add a new future.unstable_trailingSlashAwareDataRequests flag to provide consistent behavior of request.pathname inside middleware, loader, and action functions on document and data requests when a trailing slash is present in the browser URL. (#14644)
Currently, your HTTP and request pathnames would be as follows for /a/b/c and /a/b/c/
URL /a/b/c
HTTP pathname
request pathname`
Document
/a/b/c
/a/b/c ✅
Data
/a/b/c.data
/a/b/c ✅
URL /a/b/c/
HTTP pathname
request pathname`
Document
/a/b/c/
/a/b/c/ ✅
Data
/a/b/c.data
/a/b/c⚠️
With this flag enabled, these pathnames will be made consistent though a new _.data format for client-side .data requests:
URL /a/b/c
HTTP pathname
request pathname`
Document
/a/b/c
/a/b/c ✅
Data
/a/b/c.data
/a/b/c ✅
URL /a/b/c/
HTTP pathname
request pathname`
Document
/a/b/c/
/a/b/c/ ✅
Data
/a/b/c/_.data ⬅️
/a/b/c/ ✅
This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic.
Enabling this flag also changes the format of client side .data requests from /_root.data to /_.data when navigating to / to align with the new format. This does not impact the request pathname which is still / in all cases.
Preserve clientLoader.hydrate=true when using <HydratedRouter unstable_instrumentations> (#14674)
Stabilize <HydratedRouter onError>/<RouterProvider onError> (#14546)
Patch Changes
add support for throwing redirect Response's at RSC render time (#14596)
Support for throwing data() and Response from server component render phase. Response body is not serialized as async work is not allowed as error encoding phase. If you wish to transmit data to the boundary, throw data() instead. (#14632)
Fix unstable_useTransitions prop on <Router> component to permit omission for backewards compatibility (#14646)
routeRSCServerRequest replace fetchServer with serverResponse (#14597)
[UNSTABLE] Add a new unstable_defaultShouldRevalidate flag to various APIs to allow opt-ing out of standard revalidation behaviors. (#14542)
If active routes include a shouldRevalidate function, then your value will be passed as defaultShouldRevalidate in those function so that the route always has the final revalidation determination.
Update the useOptimistic stub we provide for React 18 users to use a stable setter function to avoid potential useEffect loops - specifically when using <Link viewTransition> (#14628)
match.shouldRevalidateArgs is the argument that will be passed to the route shouldRevaliate function
Combined with the parameter accepted by match.shouldCallHandler, you can define a custom revalidation behavior for your dataStrategy:
constmatchesToLoad=matches.filter((m)=>{constdefaultShouldRevalidate=customRevalidationBehavior(match.shouldRevalidateArgs,);returnm.shouldCallHandler(defaultShouldRevalidate);// The argument here will override the internal `defaultShouldRevalidate` value});
Patch Changes
Fix a Framework Mode bug where the defaultShouldRevalidate parameter to shouldRevalidate would not be correct after action returned a 4xx/5xx response (true when it should have been false) (#14592)
If your shouldRevalidate function relied on that parameter, you may have seen unintended revalidations
Fix fetcher.submit failing with plain objects containing a tagName property (#14534)
[UNSTABLE] Add unstable_pattern to the parameters for client side unstable_onError, refactor how it's called by RouterProvider to avoid potential strict mode issues (#14573)
Router state updates are wrapped in React.startTransition
⚠️ This can lead to buggy behaviors if you are wrapping your own navigations/fetchers in React.startTransition
You should set the flag to true if you run into this scenario to get the enhanced useOptimistic behavior (requires React 19)
When set to true
Router state updates remain wrapped in React.startTransition (as they are without the flag)
Link/Form navigations will be wrapped in React.startTransition
A subset of router state info will be surfaced to the UI during navigations via React.useOptimistic (i.e., useNavigation(), useFetchers(), etc.)
⚠️ This is a React 19 API so you must also be React 19 to opt into this flag for Framework/Data Mode
When set to false
The router will not leverage React.startTransition or React.useOptimistic on any navigations or state changes
Declarative Mode
<BrowserRouter unstable_useTransitions>
When left unset
Router state updates are wrapped in React.startTransition
When set to true
Router state updates remain wrapped in React.startTransition (as they are without the flag)
Link/Form navigations will be wrapped in React.startTransition
When set to false
the router will not leverage React.startTransition on any navigations or state changes
Fix the promise returned from useNavigate in Framework/Data Mode so that it properly tracks the duration of popstate navigations (i.e., navigate(-1)) (#14524)
Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled (#14577)
Preserve statusText on the ErrorResponse instance when throwing data() from a route handler (#14555)
Optimize href() to avoid backtracking regex on splat (#14329)
// app/routes/some-other-route.tsxexportdefaultfunctionComponent(){constadmin=useRoute("routes/admin");if(!admin)thrownewError("Not nested within 'routes/admin'");console.log(admin.handle);// ^? { hello: string }}
Ensure action handlers run for routes with middleware even if no loader is present (#14443)
Add unstable_instrumentations API to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches (#14412)
This also adds a new unstable_pattern parameter to loaders/actions/middleware which contains the un-interpolated route pattern (i.e., /blog/:slug) which is useful for aggregating performance metrics by route
handle external redirects in from server actions (#14400)
New (unstable) useRoute hook for accessing data from specific routes (#14407)
For example, let's say you have an admin route somewhere in your app and you want any child routes of admin to all have access to the loaderData and actionData from admin.
This usage is equivalent to calling useLoaderData and useActionData, but consolidates all route data access into one hook: useRoute.
Note: when calling useRoute() (without a route ID), TS has no way to know which route is the current route.
As a result, loaderData and actionData are typed as unknown.
If you want more type-safety, you can either narrow the type yourself with something like zod or you can refactor your app to pass down typed props to your AdminWidget:
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: pnpm-lock.yaml
Scope: all 10 workspace projects
WARN GET https://registry.npmjs.org/@react-enhanced%2Fshared error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Futils error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftranslate error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftypes error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Fhooks error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/react/-/react-18.2.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/type-fest/-/type-fest-3.7.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Fshared error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Futils error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftranslate error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Ftypes error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/@react-enhanced%2Fhooks error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/react/-/react-18.2.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/type-fest/-/type-fest-3.7.2.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
WARN GET https://registry.npmjs.org/qrcode/-/qrcode-1.5.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/qrious/-/qrious-4.0.2.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@1stg/app-config/-/app-config-8.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@1stg/lib-config/-/lib-config-11.0.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@changesets/changelog-github/-/changelog-github-0.4.8.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@changesets/cli/-/cli-2.26.1.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@mdx-js/react/-/react-2.3.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@mdx-js/rollup/-/rollup-2.3.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.0.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
ERR_INVALID_THIS Value of "this" must be of type URLSearchParams
pnpm [ERR_INVALID_THIS]: Value of "this" must be of type URLSearchParams
at Proxy.getAll (node:internal/url:554:13)
at Proxy.<anonymous> (/opt/containerbase/tools/pnpm/8.2.0/24.20.0/node_modules/pnpm/dist/pnpm.cjs:60566:55)
at /opt/containerbase/tools/pnpm/8.2.0/24.20.0/node_modules/pnpm/dist/pnpm.cjs:60628:31
at Array.reduce (<anonymous>)
at Proxy.raw (/opt/containerbase/tools/pnpm/8.2.0/24.20.0/node_modules/pnpm/dist/pnpm.cjs:60627:33)
at new Headers (/opt/containerbase/tools/pnpm/8.2.0/24.20.0/node_modules/pnpm/dist/pnpm.cjs:60512:28)
at getNodeRequestOptions (/opt/containerbase/tools/pnpm/8.2.0/24.20.0/node_modules/pnpm/dist/pnpm.cjs:60861:23)
at /opt/containerbase/tools/pnpm/8.2.0/24.20.0/node_modules/pnpm/dist/pnpm.cjs:60918:25
at new Promise (<anonymous>)
at fetch (/opt/containerbase/tools/pnpm/8.2.0/24.20.0/node_modules/pnpm/dist/pnpm.cjs:60916:14)
WARN GET https://registry.npmjs.org/@types/react/-/react-18.0.33.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.11.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
WARN GET https://registry.npmjs.org/@types/web/-/web-0.0.99.tgz error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^6.10.0→^7.0.0React Router has unexpected external redirect via untrusted paths
CVE-2025-68470 / GHSA-9jcx-v3wj-wh4m
More information
Details
An attacker-supplied path can be crafted so that when a React Router application navigates to it via
navigate(),<Link>, orredirect(), the app performs a navigation/redirect to an external URL. This is only an issue if developers pass untrusted content into navigation paths in their application code.Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router's same-origin redirect with path starting // causes open redirect via protocol-relative URL reinterpretation
CVE-2026-40181 / GHSA-2j2x-hqr9-3h42
More information
Details
Certain URLs passed to the
redirectfunction can trigger an open redirect to an external domain depending on the level of validation done by the application prior to returning theredirect.Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:UReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration
CVE-2026-53666 / GHSA-337j-9hxr-rhxg
More information
Details
If application code allows attacker supplied input to overwrite certain aspects of errors caught by the SSR process, then it was possible for attacker to trigger unexpected constructor execution on the client which would trigger outbound network traffic. This is only possible with very specific (and unlikely) application layer code.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Open redirect via backslash in and useNavigate (CVE-2025-68470 bypass)
CVE-2026-53669 / GHSA-wrjc-x8rr-h8h6
More information
Details
This is a follow up to CVE-2025-68470. React Router was alerted to certain scenarios in which the fix there was incomplete so there still existed some scenarios where attacker supplied paths passed to navigation mechanisms could result in unexpected external navigations.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
remix-run/react-router (react-router)
v7.18.0Compare Source
Patch Changes
ssr: falseandfuture.v8_trailingSlashAwareDataRequests: true. Avoids false positive "SPA Mode" detection when serving prerendered paths (#15173)ServerRouternonce for nonce-aware SSR components when they don't provide their own value so strict CSP pages can load them. (#15170)turbo-streamto serialize and deserialize Framework Mode hydration errors (#15175)v7.17.0Compare Source
Minor Changes
Ship a subset of the official documentation inside the
react-routerpackage (#15121)node_modules/react-router/docs, letting AI coding agents and the React Router agent skills read official docs locallyapi/),community/content, and tutorials (tutorials/)v7.16.0Compare Source
Minor Changes
future.unstable_trailingSlashAwareDataRequestsasfuture.v8_trailingSlashAwareDataRequests(#15098)Patch Changes
Disable manifest path when lazy route dicovery is disabled (#15068)
Fix browser URL creation to use the configured history window instead of the global window. (#15066)
createBrowserURLImplso custom window contexts keep the correct URL origin.Fix
useNavigation()return type to preserve discriminated union across navigation states (#15095)Widen
MetaDescriptorscript:ld+jsontype fromLdJsonObjecttoLdJsonObject | LdJsonObject[]to permit multiple JSON-LD schemas in a single<script type="application/ld+json">tag emitted by<Meta />(#15082)v7.15.1Compare Source
Patch Changes
serverLoader()returning stale SSR data when a client navigation aborts pending hydration before the hydrationclientLoaderresolves (#15022)RouterProvideronErrorcallback not being called for synchronous initial loader errors in SPA mode (#15039) (#14942)useFetchersto return a stable identity and only change if fetchers changed (#15028)Unstable Changes
unstable_useRouterState()hook that consolidates access to active and pending router states (RFC: #12358) (#15017)Data/Framework/RSC only — throws when used without a data router
This should allow you to consolidate usages of the following hooks which will likely be deprecated and removed in a future major version
useLocationuseSearchParamsuseParamsuseMatchesuseNavigationTypeuseNavigationv7.15.0Compare Source
Minor Changes
Stabilize
unstable_defaultShouldRevalidateasdefaultShouldRevalidateon<Link>,<Form>,useLinkClickHandler,useSubmit,fetcher.submit, andsetSearchParams(a993f09)Stabilize the instrumentation APIs.
unstable_instrumentationsis nowinstrumentationsandunstable_patternis nowpattern(a993f09)unstable_ServerInstrumentation,unstable_ClientInstrumentation,unstable_InstrumentRequestHandlerFunction,unstable_InstrumentRouterFunction,unstable_InstrumentRouteFunction, andunstable_InstrumentationHandlerResulttypes have had theirunstable_prefixes removedStabilize
unstable_maskasmaskon<Link>,useLinkClickHandler, anduseNavigate, and rename the correspondingLocation.unstable_maskfield toLocation.mask(a993f09)Stabilize the
unstable_normalizePathoption onstaticHandler.queryandstaticHandler.queryRouteasnormalizePath(a993f09)Stabilize
future.unstable_passThroughRequestsasfuture.v8_passThroughRequests(a993f09)Remove
unstable_subResourceIntegrityfrom the runtimeFutureConfigtype; the flag is now controlled by the top-levelsubResourceIntegrityoption inreact-router.config.ts(a993f09)Stabilize
unstable_urlasurlonloader,action, andmiddlewarefunction args (a993f09)Stabilize
unstable_useTransitionsasuseTransitionson<BrowserRouter>,<HashRouter>,<HistoryRouter>,<MemoryRouter>,<Router>,<RouterProvider>,<HydratedRouter>, anduseLinkClickHandler(a993f09)Patch Changes
Add
nonceto<Scripts><link rel="modulepreload">elements (if provided) (af5d49b)Fix a bug with
unstable_defaultShouldRevalidate={false}where parent routes that did not export ashouldRevalidatefunction could be incorrectly included in the single fetch call for new child route data (#15012)Improve server-side route matching performance by pre-computing flattened/cached route branches (#14967) (af5d49b)
Mark
maskas an optional field inLocationfor easier mocking in unit tests (#14999)Cache flattened/ranked route branches to optimize server-side route matching (#14967)
Improve route matching performance in Framework/Data Mode (#14971) (af5d49b)
matchRoutesin data router scenarios7.6.0(#13562)matchesbut always updatingmatch.routeto the latest route in themanifestv7.14.2Compare Source
Patch Changes
Remove the un-documented custom error serialization logic from the internal turbo-stream implementation. React Router only automatically handles serialization of
Errorand it's standard subtypes (SyntaxError,TypeError, etc.). ([aabf4a1)Properly handle parent middleware redirects during
fetcher.load([aabf4a1)Remove redundant
Omit<RouterProviderProps, "flushSync">fromreact-router/domRouterProvider([aabf4a1)Improved types for
generatePath'sparamarg ([aabf4a1)Type errors when required params are omitted:
Allow omission of optional params:
Allows extra keys:
v7.14.1Compare Source
Patch Changes
HydrateFallbackand initial loaders land before therouter.subscribecall happens in theRouterProviderlayout effectv7.14.0Compare Source
Patch Changes
UNSTABLE RSC FRAMEWORK MODE BREAKING CHANGE - Existing route module exports remain unchanged from stable v7 non-RSC mode, but new exports are added for RSC mode. If you want to use RSC features, you will need to update your route modules to export the new annotations. (#14901)
If you are using RSC framework mode currently, you will need to update your route modules to the new conventions. The following route module components have their own mutually exclusive server component counterparts:
ServerComponentdefaultServerErrorBoundaryErrorBoundaryServerLayoutLayoutServerHydrateFallbackHydrateFallbackIf you were previously exporting a
ServerComponent, yourErrorBoundary,Layout, andHydrateFallbackwere also server components. If you want to keep those as server components, you can rename them and prefix them withServer. If you were previously importing the implementations of those components from a client module, you can simply inline them.Example:
Before
After
rsc Link prefetch (#14902)
Remove recursion from turbo-stream v2 allowing for encoding / decoding of massive payloads. (#14838)
encodeViaTurboStream leaked memory via unremoved AbortSignal listener (#14900)
v7.13.2Compare Source
Patch Changes
Fix clientLoader.hydrate when an ancestor route is also hydrating a clientLoader (#14835)
Fix type error when passing Framework Mode route components using
Route.ComponentPropstocreateRoutesStub(#14892)Fix percent encoding in relative path navigation (#14786)
Add
future.unstable_passThroughRequestsflag (#14775)By default, React Router normalizes the
request.urlpassed to yourloader,action, andmiddlewarefunctions by removing React Router's internal implementation details (.datasuffixes,index+_routesquery params).Enabling this flag removes that normalization and passes the raw HTTP
requestinstance to your handlers. This provides a few benefits:new Request()calls on the critical path.datasuffix (useful for observability purposes)If you were previously relying on the normalization of
request.url, you can switch to use the new siblingunstable_urlparameter which contains aURLinstance representing the normalized location:Internal refactor to consolidate framework-agnostic/React-specific route type layers - no public API changes (#14765)
Sync protocol validation to rsc flows (#14882)
Add a new
unstable_url: URLparameter to route handler methods (loader,action,middleware, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (.datasuffix,index/_routesquery params) (#14775)This is being added alongside the new
future.unstable_passthroughRequestsfuture flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalizedrequest's are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization ofrequest.urlin your application code.If you don't have the flag enabled, then
unstable_urlwill matchrequest.url.v7.13.1Compare Source
Patch Changes
fix null reference exception in bad codepath leading to invalid route tree comparisons (#14780)
fix: clear timeout when turbo-stream encoding completes (#14810)
Improve error message when Origin header is invalid (#14743)
Fix matchPath optional params matching without a "/" separator. (#14689)
add RSC unstable_getRequest (#14758)
Fix
HydrateFallbackrendering during initial lazy route discovery with matching splat route (#14740)[UNSTABLE] Add support for
<Link unstable_mask>in Data Mode which allows users to navigate to a URL in the router but "mask" the URL displayed in the browser. This is useful for contextual routing usages such as displaying an image in a model on top of a gallery, but displaying a browser URL directly to the image that can be shared and loaded without the contextual gallery in the background. (#14716)Notes:
useLocation().unstable_maskso you can detect whether you are currently masked or not.history.stateduring SSR.backgroundLocationmanagement.RSC: Update failed origin checks to return a 400 status and appropriate UI instead of a generic 500 (#14755)
Preserve query parameters and hash on manifest version mismatch reload (#14813)
v7.13.0Compare Source
Minor Changes
crossOriginprop toLinkscomponent (#14687)Patch Changes
allowedActionOriginsglob check so**matches all domains (#14722)v7.12.0Compare Source
Minor Changes
react-router.config.tsconfigallowedActionOriginsfield. (#14708)Patch Changes
Fix
generatePathwhen used with suffixed params (i.e., "/books/:id.json") (#14269)Export
UNSAFE_createMemoryHistoryandUNSAFE_createHashHistoryalongsideUNSAFE_createBrowserHistoryfor consistency. These are not intended to be used for new apps but intended to help apps usiongunstable_HistoryRoutermigrate from v6->v7 so they can adopt the newer APIs. (#14663)Escape HTML in scroll restoration keys (#14705)
Validate redirect locations (#14706)
[UNSTABLE] Pass
<Scripts nonce>value through to the underlyingimportmapscripttag when usingfuture.unstable_subResourceIntegrity(#14675)[UNSTABLE] Add a new
future.unstable_trailingSlashAwareDataRequestsflag to provide consistent behavior ofrequest.pathnameinsidemiddleware,loader, andactionfunctions on document and data requests when a trailing slash is present in the browser URL. (#14644)Currently, your HTTP and
requestpathnames would be as follows for/a/b/cand/a/b/c//a/b/crequestpathname`/a/b/c/a/b/c✅/a/b/c.data/a/b/c✅/a/b/c/requestpathname`/a/b/c//a/b/c/✅/a/b/c.data/a/b/cWith this flag enabled, these pathnames will be made consistent though a new
_.dataformat for client-side.datarequests:/a/b/crequestpathname`/a/b/c/a/b/c✅/a/b/c.data/a/b/c✅/a/b/c/requestpathname`/a/b/c//a/b/c/✅/a/b/c/_.data⬅️/a/b/c/✅This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic.
Enabling this flag also changes the format of client side
.datarequests from/_root.datato/_.datawhen navigating to/to align with the new format. This does not impact therequestpathname which is still/in all cases.Preserve
clientLoader.hydrate=truewhen using<HydratedRouter unstable_instrumentations>(#14674)v7.11.0Compare Source
Minor Changes
<HydratedRouter onError>/<RouterProvider onError>(#14546)Patch Changes
add support for throwing redirect Response's at RSC render time (#14596)
Support for throwing
data()and Response from server component render phase. Response body is not serialized as async work is not allowed as error encoding phase. If you wish to transmit data to the boundary, throwdata()instead. (#14632)Fix
unstable_useTransitionsprop on<Router>component to permit omission for backewards compatibility (#14646)routeRSCServerRequestreplacefetchServerwithserverResponse(#14597)[UNSTABLE] Add a new
unstable_defaultShouldRevalidateflag to various APIs to allow opt-ing out of standard revalidation behaviors. (#14542)If active routes include a
shouldRevalidatefunction, then your value will be passed asdefaultShouldRevalidatein those function so that the route always has the final revalidation determination.<Form method="post" unstable_defaultShouldRevalidate={false}>submit(data, { method: "post", unstable_defaultShouldRevalidate: false })<fetcher.Form method="post" unstable_defaultShouldRevalidate={false}>fetcher.submit(data, { method: "post", unstable_defaultShouldRevalidate: false })This is also available on non-submission APIs that may trigger revalidations due to changing search params:
<Link to="/" unstable_defaultShouldRevalidate={false}>navigate("/?foo=bar", { unstable_defaultShouldRevalidate: false })setSearchParams(params, { unstable_defaultShouldRevalidate: false })Allow redirects to be returned from client side middleware (#14598)
Handle
dataStrategyimplementations that return insufficient result sets by adding errors for routes without any available result (#14627)v7.10.1Compare Source
Patch Changes
useOptimisticstub we provide for React 18 users to use a stable setter function to avoid potentialuseEffectloops - specifically when using<Link viewTransition>(#14628)v7.10.0Compare Source
Minor Changes
Stabilize
fetcher.reset()(#14545)fetcher.unstable_reset()Stabilize the
dataStrategymatch.shouldRevalidateArgs/match.shouldCallHandler()APIs. (#14592)The
match.shouldLoadAPI is now marked deprecated in favor of these more powerful alternativesIf you're using this API in a custom
dataStrategytoday, you can swap to the new API at your convenience:match.shouldRevalidateArgsis the argument that will be passed to the routeshouldRevaliatefunctionCombined with the parameter accepted by
match.shouldCallHandler, you can define a custom revalidation behavior for yourdataStrategy:Patch Changes
Fix a Framework Mode bug where the
defaultShouldRevalidateparameter toshouldRevalidatewould not be correct afteractionreturned a 4xx/5xx response (truewhen it should have beenfalse) (#14592)shouldRevalidatefunction relied on that parameter, you may have seen unintended revalidationsFix
fetcher.submitfailing with plain objects containing atagNameproperty (#14534)[UNSTABLE] Add
unstable_patternto the parameters for client sideunstable_onError, refactor how it's called byRouterProviderto avoid potential strict mode issues (#14573)Add new
unstable_useTransitionsflag to routers to give users control over the usage ofReact.startTransitionandReact.useOptimistic. (#14524)<HydratedRouter unstable_transition>/<RouterProvider unstable_transition>React.startTransitionReact.startTransitiontrueif you run into this scenario to get the enhanceduseOptimisticbehavior (requires React 19)trueReact.startTransition(as they are without the flag)Link/Formnavigations will be wrapped inReact.startTransitionReact.useOptimistic(i.e.,useNavigation(),useFetchers(), etc.)falseReact.startTransitionorReact.useOptimisticon any navigations or state changes<BrowserRouter unstable_useTransitions>React.startTransitiontrueReact.startTransition(as they are without the flag)Link/Formnavigations will be wrapped inReact.startTransitionfalseReact.startTransitionon any navigations or state changesFix the promise returned from
useNavigatein Framework/Data Mode so that it properly tracks the duration ofpopstatenavigations (i.e.,navigate(-1)) (#14524)Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled (#14577)
Preserve
statusTexton theErrorResponseinstance when throwingdata()from a route handler (#14555)Optimize href() to avoid backtracking regex on splat (#14329)
v7.9.6Compare Source
Patch Changes
[UNSTABLE] Add
location/paramsas arguments to client-sideunstable_onErrorto permit enhanced error reporting. (#14509)unstable_onError. The seconderrorInfoparameter is now an object withlocationandparams:Properly handle ancestor thrown middleware errors before
next()on fetcher submissions (#14517)Fix issue with splat routes interfering with multiple calls to patchRoutesOnNavigation (#14487)
Normalize double-slashes in
resolvePath(#14529)v7.9.5Compare Source
Patch Changes
Move RSCHydratedRouter and utils to
/domexport. (#14457)useRoute: return type-safe
handle(#14462)For example:
Ensure action handlers run for routes with middleware even if no loader is present (#14443)
Add
unstable_instrumentationsAPI to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches (#14412)entry.server.tsx:export const unstable_instrumentations = [...]entry.client.tsx:<HydratedRouter unstable_instrumentations={[...]} />createBrowserRouter(routes, { unstable_instrumentations: [...] })This also adds a new
unstable_patternparameter to loaders/actions/middleware which contains the un-interpolated route pattern (i.e.,/blog/:slug) which is useful for aggregating performance metrics by routev7.9.4Compare Source
Patch Changes
handle external redirects in from server actions (#14400)
New (unstable)
useRoutehook for accessing data from specific routes (#14407)For example, let's say you have an
adminroute somewhere in your app and you want any child routes ofadminto all have access to theloaderDataandactionDatafromadmin.You might even want to create a reusable widget that all of the routes nested under
admincould use:In framework mode,
useRouteknows all your app's routes and gives you TS errors when invalid route IDs are passed in:useRoutereturnsundefinedif the route is not part of the current page:Note: the
rootroute is the exception since it is guaranteed to be part of the current page.As a result,
useRoutenever returnsundefinedforroot.loaderDataandactionDataare marked as optional since they could be accessed before theactionis triggered or after theloaderthrew an error:If instead of a specific route, you wanted access to the current route's
loaderDataandactionData, you can calluseRoutewithout arguments:This usage is equivalent to calling
useLoaderDataanduseActionData, but consolidates all route data access into one hook:useRoute.Note: when calling
useRoute()(without a route ID), TS has no way to know which route is the current route.As a result,
loaderDataandactionDataare typed asunknown.If you want more type-safety, you can either narrow the type yourself with something like
zodor you can refactor your app to pass down typed props to yourAdminWidget:v7.9.3Compare Source
Patch Changes
Do not try to use
turbo-streamto decode CDN errors that never reached the server (#14385)Fix Data Mode regression causing a 404 during initial load in when
middlewareexists without anyloaderfunctions (#14393)v7.9.2Compare Source
Patch Changes
middlewareon initial load even if no loaders exist (#14348)createRoutesStubto run route middleware<RoutesStub future={{ v8_middleware: true }} />flag to enable the propercontexttypeUpdate Lazy Route Discovery manifest requests to use a singular comma-separated
pathsquery param instead of repeatedpquery params (#14321)[UNSTABLE] Add
fetcher.unstable_reset()API (#14206)Made useOutlet element reference have stable identity in-between route chages (#13382)
feat: enable full transition support for the rsc router (#14362)
In RSC Data Mode, handle SSR'd client errors and re-try in the browser (#14342)
Support
middlewareprop on<Route>for usage with a data router viacreateRoutesFromElements(#14357)Handle encoded question mark and hash characters in ancestor splat routes (#14249)
Fail gracefully on manifest version mismatch logic if
sessionStorageaccess is blocked (#14335)v7.9.1Compare Source
Patch Changes
Futureinterface naming frommiddleware->v8_middleware(#14327)v7.9.0Compare Source
Minor Changes
Stabilize middleware and context APIs. (#14215)
We have removed the
unstable_prefix from the following APIs and they are now considered stable and ready for production use:RouterContextProvidercreateContextcreateBrowserRoutergetContextoption<HydratedRouter>getContextpropPlease see the [Middl
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.