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
{{ message }}
Repository navigation
fix(deps): update dependency react-router to v7.18.5 [security] (v2) - #9283
This is a follow up to GHSA-8646-j5j9-6r62. React Router was alerted of a code path in the (unstable) RSC error handling path in which redirects from untrusted sources could still result in an XSS vector via attacker-supplied redirect targets
[!NOTE]
This only affects your application if you are using the unstable RSC APIs
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.
This is a follow up to GHSA-8x6r-g9mw-2r78 that covers additional reported scenarios in which the manifest endpoint could be accessed via unauthenticated targeted requests that would put heavy load on the server and slow down response times.
[!NOTE]
This only impacts Framework Mode applications. This does not impact your application if you are using Declarative or Data Mode.
React Router’s unstable React Server Components support contains a cross-site scripting vulnerability when rendering redirects containing untrusted input, potentially allowing JavaScript execution in the application’s origin.
Affected Modes: RSC Data (unstable) and RSC Framework (unstable).
Exploitation requires an application to use attacker-controlled input as a redirect destination during server-side HTML rendering.
A prototype pollution vulnerability in React Router’s data deserialization may allow attacker-controlled serialized data to interfere with application behavior, potentially compromising application integrity or availability.
Affected Modes: Framework.
Exploitation requires attacker influence over serialized data processed by the affected decoder.
React Router applications performing server-side route discovery may consume excessive server resources when processing specially crafted requests, potentially resulting in denial of service.
Affected Modes: Framework, RSC Data (unstable), and RSC Framework (unstable).
In Framework Mode, exposure requires server-side rendering with lazy route discovery enabled. In the RSC modes, affected processing can also occur when handling RSC data requests.
A flaw in React Router’s server-side origin validation may allow cross-site request forgery under certain deployment and session configurations, potentially enabling unauthorized actions on behalf of authenticated users.
Affected Modes: Framework, RSC Data (unstable), and RSC Framework (unstable).
Exploitation depends on the application’s deployment, authentication cookie configuration, and use of server-side actions.
Improper redirect URL handling in React Router may allow applications using untrusted redirect destinations to send users to attacker-controlled websites, potentially facilitating phishing attacks.
Affected Modes: Data, Framework, RSC Data (unstable), and RSC Framework (unstable).
Exploitation requires an application to use attacker-controlled input as a redirect destination.
A vulnerability in React Router’s route matching may cause excessive CPU consumption when processing specially crafted paths, potentially resulting in denial of service.
Affected Modes: Declarative, Data, Framework, RSC Data (unstable), and RSC Framework (unstable).
Impact may occur in the browser or on the server, depending on where route matching runs.
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}}
[!IMPORTANT]
✂ PR body was truncated to here.
Configuration
📅 Schedule: (UTC)
Branch creation
At any time (no schedule defined)
Automerge
At any time (no schedule defined)
🚦 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 these updates again.
If you want to rebase/retry this PR, check this box
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.
💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
fixed: Invalid group: The package or glob "lib1" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. Note that glob expressions must be defined according to https://npmx.dev/picomatch.
fixed: Invalid group: The package or glob "lib2" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. Note that glob expressions must be defined according to https://npmx.dev/picomatch.
renovateBot
changed the title
fix(deps): update dependency react-router to v7.18.4 [security] (v2)
fix(deps): update dependency react-router to v7.18.5 [security] (v2)
Dec 1, 2026
This branch has not been deployed
No deployments
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.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
6.30.3→7.18.57.18.2→7.18.5React Router: RSCErrorHandler Missing Protocol Validation (XSS)
CVE-2026-53667 / GHSA-h8fp-f39c-q6mh
More information
Details
This is a follow up to GHSA-8646-j5j9-6r62. React Router was alerted of a code path in the (unstable) RSC error handling path in which redirects from untrusted sources could still result in an XSS vector via attacker-supplied redirect targets
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:NReferences
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).
React Router: Unauthenticated Denial of Service via Inefficient Route Matching
CVE-2026-55685 / GHSA-chx6-hx7r-mcp5
More information
Details
This is a follow up to GHSA-8x6r-g9mw-2r78 that covers additional reported scenarios in which the manifest endpoint could be accessed via unauthenticated targeted requests that would put heavy load on the server and slow down response times.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: RSC Mode CSRF Bypass Allows Action Execution Before 400 Response
GHSA-qwww-vcr4-c8h2
More information
Details
This is a follow up to CVE-2026-22030 to address related CSRF flows in unstable RSC code paths.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Cross-site Scripting due to escapeHtml use in meta refresh HTML attributes
CVE-2026-139994 / GHSA-mjj8-rxh9-q8f5
More information
Details
React Router’s unstable React Server Components support contains a cross-site scripting vulnerability when rendering redirects containing untrusted input, potentially allowing JavaScript execution in the application’s origin.
Affected Modes: RSC Data (unstable) and RSC Framework (unstable).
Exploitation requires an application to use attacker-controlled input as a redirect destination during server-side HTML rendering.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Prototype Pollution via Vendored turbo-stream Deserializer
CVE-2026-139996 / GHSA-qhgm-jj2j-75wj
More information
Details
A prototype pollution vulnerability in React Router’s data deserialization may allow attacker-controlled serialized data to interfere with application behavior, potentially compromising application integrity or availability.
Affected Modes: Framework.
Exploitation requires attacker influence over serialized data processed by the affected decoder.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Unauthenticated denial of service via unbounded route-manifest path expansion during SSR document rendering
CVE-2026-139995 / GHSA-2rq8-3rm6-2w8f
More information
Details
React Router applications performing server-side route discovery may consume excessive server resources when processing specially crafted requests, potentially resulting in denial of service.
Affected Modes: Framework, RSC Data (unstable), and RSC Framework (unstable).
In Framework Mode, exposure requires server-side rendering with lazy route discovery enabled. In the RSC modes, affected processing can also occur when handling RSC data requests.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Cross-scheme CSRF bypass in Origin validation
CVE-2026-139999 / GHSA-8wpx-2pj4-ggvx
More information
Details
A flaw in React Router’s server-side origin validation may allow cross-site request forgery under certain deployment and session configurations, potentially enabling unauthorized actions on behalf of authenticated users.
Affected Modes: Framework, RSC Data (unstable), and RSC Framework (unstable).
Exploitation depends on the application’s deployment, authentication cookie configuration, and use of server-side actions.
Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Open redirect via tab character in redirect() paths — bypass of the CVE-2026-53669 / CVE-2026-40181 normalization
CVE-2026-139997 / GHSA-7m2v-44vx-v55w
More information
Details
Improper redirect URL handling in React Router may allow applications using untrusted redirect destinations to send users to attacker-controlled websites, potentially facilitating phishing attacks.
Affected Modes: Data, Framework, RSC Data (unstable), and RSC Framework (unstable).
Exploitation requires an application to use attacker-controlled input as a redirect destination.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
React Router: Polynomial-time ReDoS in matchPath and matchRoutes trailing-slash handling
CVE-2026-139998 / GHSA-x8j4-g9rr-8j87
More information
Details
A vulnerability in React Router’s route matching may cause excessive CPU consumption when processing specially crafted paths, potentially resulting in denial of service.
Affected Modes: Declarative, Data, Framework, RSC Data (unstable), and RSC Framework (unstable).
Impact may occur in the browser or on the server, depending on where route matching runs.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/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.5: v7.18.5Compare Source
See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7185
v7.18.4: v7.18.4Compare Source
See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7184
v7.18.3: v7.18.3Compare Source
See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7183
v7.18.2: v7.18.2Compare Source
See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7182
v7.18.1: v7.18.1Compare Source
See the changelog for release notes: https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7181
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
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: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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.