Renovate: Update dependency react-router to v8.5.2 #66

Open
renovate-bot wants to merge 1 commit from renovate/react-router-8.x-lockfile into main
Collaborator

This PR contains the following updates:

Package Type Update Change
react-router (source) dependencies minor 8.3.0 → 8.5.2

Release Notes

remix-run/react-router (react-router)

v8.5.2

Compare Source

Patch Changes
  • Keep navigation metadata consistent after a submission action throws an error (#​15621)
    • Use the committed history action for loader dataStrategy navigation types and loading navigation history actions
  • Cancel the discarded response body for HEAD requests, so a resource route streaming a file no longer leaks its file descriptor (#​15634)
    • Keep observing nested deferred promise rejections after cancelling a data response so they cannot crash the server
  • Preserve streamed <Suspense> boundaries during hydration in development (#​15382)
    • Wrap the critical CSS reset in React.startTransition to prevent React 19 from silently discarding the server HTML and rendering the boundary on the client
  • Fix submissions to root form actions containing search parameters or a hash when a basename is configured (#​15725)
  • Fix href() to throw for null required parameters and omit null splat parameters without a trailing slash, matching the behavior for undefined and the defined types (#​15754)
  • Fix generated MetaArgs.matches types to stop at the current route instead of appending an unknown, possibly undefined tail (#​15697)
  • Improve path generation and URL validation across href(), generatePath(), links, forms, fetchers, and redirects (#​15785)
  • Stop redirect(), redirectDocument() and replace() from setting status: 302 on the ResponseInit passed to them (#​15753)
    • Later responses created from the same init object no longer get status 302, and a frozen init no longer throws
  • Clear an <Await> render error when it receives a new resolve value, so the error element no longer stays on screen after navigating to a route whose data renders fine (#​15695)
  • Run clientMiddleware during RSC client navigations and preserve it when route components update via HMR (#​15763)
  • Handle HEAD resource responses consistently in RSC Framework and RSC Data modes (#​15783)
  • Fix initial rendering of RSC routes with a clientLoader and no HydrateFallback (#​15763)
  • Fix <ScrollRestoration> throwing an uncaught error before hydration when sessionStorage is unavailable (#​15566)
    • The inline restore script already logged the storage error, but its cleanup call accessed sessionStorage again and threw (e.g. Chrome with "Block all cookies", sandboxed cross-origin iframes)
    • The error is still logged with console.error; only the second, uncaught throw is removed
  • Fix useBlocker leaving behind a stale blocker that keeps blocking navigation after its component is hidden and shown again with <Activity>, or after the router is recreated (#​15710)

v8.5.1

Compare Source

Patch Changes
  • Fix URIError: URI malformed when an ssr: false dev server receives a URL path with a malformed percent-encoding (#​15649)
  • Bound server route manifest processing for paths with expensive route expansion (#​15703)
    • Fall back to initial route discovery during server rendering and RSC document/data requests
    • Account for the number and depth of candidate branches when using regex matching
  • Encode commas within paths sent to the lazy route discovery manifest endpoint so routes with commas in their paths are discovered correctly (#​15640)
  • Fix fetcher revalidation errors bubbling to the root error boundary instead of the nearest boundary above the route that owns the fetcher (#​15676)
  • Avoid duplicate history entries when posting a <Form> to the current URL with an encoded action (#​15679)
    • Replace the current history entry when the action contains characters that get percent-encoded, such as spaces or non-ASCII characters
  • Fix an unhandled promise rejection when the browser skips a viewTransition navigation, for example in a hidden tab (#​15582)
  • Bubble rejected lazy.Component imports on loader-less routes to the nearest error boundary (#​15658)
    • Render the error boundary instead of a blank page
  • Preserve pending fetcher mutation revalidation when an older navigation or background reload completes to prevent stale loader data (#​15686)
    • Keep newer fetcher loads cancellable and preserve them when earlier revalidations finish or abort, preventing older responses from overwriting fresh fetcher data
  • Retry rejected lazy route imports instead of caching failures permanently (#​15689)
  • Revalidate loader data when a fetcher action redirect is not followed (#​15557)
    • Revalidate when an action redirect is ignored because a newer navigation started or the fetcher unmounted while the action was running
    • Include shared parent loaders when another navigation completed while the action was running
    • Continue to respect shouldRevalidate
    • Return fetchers to idle when a revalidation completes a pending navigation started by another fetcher's redirect
  • Avoid adding an incompatible document.startViewTransition() overload to the global Document type (#​15680)
    • Allow transition results to be assigned to the DOM ViewTransition type
  • Skip deleteData in destroySession when the session has no ID (#​15639)
    • Avoid failures when destroying a session without a cookie on storage that rejects an empty key
  • Surface the host's 404 response when a SPA fallback route has no prerendered data (#​15646)
    • Request single-fetch .data files for hydrating routes with a server loader in an ssr: false app with a prerender config
    • Avoid the internal "No result found for routeId" error for non-prerendered parameterized paths served via the SPA fallback
  • Improve turbo-stream decoding validation and object property handling (18e1fbd)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Add an opt-in <Await unstable_promise={promise}> implementation based on React's use() API (#​15678)
    • Use React.use instead of React Router's internal promise tracking
    • Accept promise-like values and retain errorElement, useAsyncValue, and useAsyncError support
    • Handle only promise rejections with errorElement when using unstable_promise, allowing child render errors to bubble to the nearest React error boundary
    • Track streamed promises during decoding so settled server content stays visible during hydration updates with either Await API or direct React.use()
  • Fix URIError: URI malformed when an API-only (ssr: "unstable_api-only") server receives a URL path with a malformed percent-encoding (#​15649)
  • Fix duplicate headers when throwing a redirect from an RSC server function (#​15667)

v8.5.0

Compare Source

Minor Changes
  • Deprecate React Router's view transition APIs in favor of React's <ViewTransition> component, available in React 19.3 and later (#​15493)
    • Deprecate the viewTransition props/options, useViewTransitionState, and NavLink's isTransitioning render prop and transitioning class
    • Preserve existing behavior, including support for older React versions
    • See the migration guide for a navigation example and compatibility considerations
Patch Changes
  • Fix <Await> failing to server render promises decoded from an RSC payload, which caused the Suspense boundary to switch to client rendering (#​15597)
  • Declare @types/react and @types/react-dom as optional peer dependencies so the shipped type definitions resolve React types under strict (non-hoisted) node_modules layouts (#​15528)
  • Fix the unstable_useRouterState documentation example to call the imported alias (#​15535)
  • Render the HydrateFallback of a route discovered through patchRoutesOnNavigation during initial hydration (#​15537)
    • Routes discovered during initial hydration are now exposed in state.matches while their loaders run, so <RouterProvider> renders down to the discovered route's HydrateFallback instead of rendering nothing
  • Fix router state recovery when updates occur before RouterProvider subscribes, including when other subscribers are already attached, and report current client errors once without replaying server errors during hydration (#​15637)
  • Fix matchPath not treating a static segment as optional when it contains characters outside [\w-] (#​15425)
  • Fix an RSC server crash when a client aborts a document request while the HTML stream waits for the RSC payload (#​15612)
  • Stop revalidating a fetcher after fetcher.reset(), so its cleared data no longer comes back on the next revalidation (#​15633)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Add an unstable_fetch prop to <HydratedRouter> to customize JavaScript-issued manifest and server data requests in conventional Framework Mode (#​15586)
    • The function receives the intended request as well as context identifying the type of request
    • Data request context includes navigationType ("PUSH", "REPLACE", or "POP" for navigation-initiated requests, including reloaded fetchers; null otherwise)
      • Data strategies receive equivalent metadata through unstable_initiator and unstable_navigationType
    • The custom fetch context is a discriminated union, so narrowing type to "navigation" guarantees a non-null navigationType, while other data requests have a null navigationType
      • Fetchers reloaded after an initialization redirect retain the "initialization" type and include their fetcher key
    • Like other router initialization options, the implementation is captured when the singleton router is created and thus subsequent prop changes are ignored
    • Browser-managed data prefetches from <Link prefetch> use native <link rel="prefetch"> elements and do not call the custom implementation
    • Use the callback for custom fetch options, custom headers, safe request retries, or response header inspection
    • Return response bodies unchanged so React Router can decode its manifest and Turbo Stream data protocols
  • Support API-only Framework Mode with runtime server data loading, actions, revalidation, and lazy route discovery (#​15601)
    • Hydrate prerendered pages from build-time data and fetch server loader data when hydrating a SPA fallback
    • Preserve normal loader revalidation and server-action support for eagerly loaded and lazily discovered routes, and honor loader opt-outs when making server data requests
  • Add unstable_useRouteDiscovery for application-controlled route discovery in conventional Framework Mode (#​15602)
    • Discover selected destinations or load the running client's full route manifest without loading route modules
    • Compose manifest-mismatch handlers, with shared recovery and cancellation that preserves application state
    • Keep full-manifest failures catchable without rendering error boundaries, whether mismatch handlers use the hook or event's loadAllRoutes()
    • Cancel pending revalidation alongside a canceled navigation, retaining existing data and settling interrupted fetchers before restoring Back/Forward history
    • Enable future.unstable_customRouteDiscovery to opt in
      • Apps without the flag retain existing discovery behavior
    • Call event.defaultBehavior() from a custom mismatch handler to explicitly run built-in recovery
  • Return middleware short-circuit responses as-is for document requests in RSC modes, including resource routes, instead of decoding non-RSC bodies as Flight (#​15628)
    • Include server middleware in both eager and lazy RSC route configuration types
    • Preserve HTML rendering for cached Flight responses returned by middleware, and pass through raw responses that replace the result of next()

v8.4.0

Compare Source

Minor Changes
  • Deprecate the createStaticRouter({ branches }) option (#​15297)
    • createStaticRouter now caches route branches internally, ignores branches, and logs a deprecation warning when the option is provided
    • The deprecated EntryContext.branches property remains available for compatibility but is always an empty array
Patch Changes
  • Prevent stale route discovery during manifest version-mismatch recovery (#​15489)
    • Keep concurrent manifest responses pending while a document reload is in progress
    • Report a discovery error when a previous reload failed to resolve a version mismatch instead of loading a stale route or reloading repeatedly
    • Fail pending requests if a document reload does not complete within five seconds or the document is restored from the back-forward cache, allowing subsequent requests to recover
  • Preserve lazy route module import errors during SPA navigations instead of replacing them with a missing dataStrategy result error (#​15464)
  • Switch to more granular internal router contexts to avoid unnecessary route component re-renders when unrelated data router state changes (#​15376)
    • ⚠️ This contains some breaking changes to exported UNSAFE_ contexts, so please review carefully if you are using those unsafe exports
  • Correctly escape streamed RSC redirect locations in meta tag attributes (#​15491)
  • Avoid unintended document.startViewTransition calls during initial hydration and router.revalidate() calls (#​15484)
  • Fix SingleFetchNoResultError thrown when a fetcher revalidates against a splat route during lazy route discovery (#​15395)
    • Track discovery per fetcher load so revalidation waits for the current load's discovery, even when the fetcher key is reused, while still restarting interrupted loaders after discovery completes
  • Preserve the underlying decode failure as the cause of the Unable to decode turbo-stream response error (#​15450)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • Add a Data Mode future.unstable_routePatternMatching flag for more efficient route matching powered by @remix-run/route-pattern (#​15298)
    • Add an unstable_validateParams route field to reject invalid parameter values and continue matching
  • Document access control requirements for RSC Server Functions (#​15490)
    • Treat every Server Function as a public endpoint that must perform all of its own access control checks
    • Recommend route actions when access control should be provided by route middleware

v8.3.1

Compare Source

Patch Changes
  • Fix Expected fetcher: <key> error thrown on navigation when a fetcher is aborted during its post-action revalidation (#​15365)
  • Fix lazy route discovery caching a path as discovered when the triggering navigation was aborted after the manifest response settled but before the route tree was patched, which permanently (for the session) shadowed the real route behind a catch-all or produced 404s on every subsequent visit (#​15399)
  • Improve route matching performance for long paths (#​15417)
  • Improve validation of action request origins (#​15419)
  • Fix <ScrollRestoration> leaving history.scrollRestoration set to "auto" after a bfcache restore, which let the browser restore scroll on subsequent history traversals before the destination route had rendered (#​15397)
  • Properly respect the relative option in useSubmit/fetcher.submit when resolivng the action path (#​15400)
  • Add additional URL validation on client side navigations/redirects (#​15445)

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 this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [react-router](https://github.com/remix-run/react-router) ([source](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router)) | dependencies | minor | [`8.3.0` → `8.5.2`](https://renovatebot.com/diffs/npm/react-router/8.3.0/8.5.2) | --- ### Release Notes <details> <summary>remix-run/react-router (react-router)</summary> ### [`v8.5.2`](https://github.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#v852) [Compare Source](https://github.com/remix-run/react-router/compare/react-router@8.5.1...react-router@8.5.2) ##### Patch Changes - Keep navigation metadata consistent after a submission action throws an error ([#&#8203;15621](https://github.com/remix-run/react-router/pull/15621)) - Use the committed history action for loader `dataStrategy` navigation types and loading navigation history actions - Cancel the discarded response body for `HEAD` requests, so a resource route streaming a file no longer leaks its file descriptor ([#&#8203;15634](https://github.com/remix-run/react-router/pull/15634)) - Keep observing nested deferred promise rejections after cancelling a data response so they cannot crash the server - Preserve streamed `<Suspense>` boundaries during hydration in development ([#&#8203;15382](https://github.com/remix-run/react-router/pull/15382)) - Wrap the critical CSS reset in `React.startTransition` to prevent React 19 from silently discarding the server HTML and rendering the boundary on the client - Fix submissions to root form actions containing search parameters or a hash when a `basename` is configured ([#&#8203;15725](https://github.com/remix-run/react-router/pull/15725)) - Fix `href()` to throw for `null` required parameters and omit `null` splat parameters without a trailing slash, matching the behavior for `undefined` and the defined types ([#&#8203;15754](https://github.com/remix-run/react-router/pull/15754)) - Fix generated `MetaArgs.matches` types to stop at the current route instead of appending an unknown, possibly undefined tail ([#&#8203;15697](https://github.com/remix-run/react-router/pull/15697)) - Improve path generation and URL validation across `href()`, `generatePath()`, links, forms, fetchers, and redirects ([#&#8203;15785](https://github.com/remix-run/react-router/pull/15785)) - Stop `redirect()`, `redirectDocument()` and `replace()` from setting `status: 302` on the `ResponseInit` passed to them ([#&#8203;15753](https://github.com/remix-run/react-router/pull/15753)) - Later responses created from the same init object no longer get status 302, and a frozen init no longer throws - Clear an `<Await>` render error when it receives a new `resolve` value, so the error element no longer stays on screen after navigating to a route whose data renders fine ([#&#8203;15695](https://github.com/remix-run/react-router/pull/15695)) - Run `clientMiddleware` during RSC client navigations and preserve it when route components update via HMR ([#&#8203;15763](https://github.com/remix-run/react-router/pull/15763)) - Handle `HEAD` resource responses consistently in RSC Framework and RSC Data modes ([#&#8203;15783](https://github.com/remix-run/react-router/pull/15783)) - Fix initial rendering of RSC routes with a `clientLoader` and no `HydrateFallback` ([#&#8203;15763](https://github.com/remix-run/react-router/pull/15763)) - Fix `<ScrollRestoration>` throwing an uncaught error before hydration when `sessionStorage` is unavailable ([#&#8203;15566](https://github.com/remix-run/react-router/pull/15566)) - The inline restore script already logged the storage error, but its cleanup call accessed `sessionStorage` again and threw (e.g. Chrome with "Block all cookies", sandboxed cross-origin iframes) - The error is still logged with `console.error`; only the second, uncaught throw is removed - Fix `useBlocker` leaving behind a stale blocker that keeps blocking navigation after its component is hidden and shown again with `<Activity>`, or after the router is recreated ([#&#8203;15710](https://github.com/remix-run/react-router/pull/15710)) ### [`v8.5.1`](https://github.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#v851) [Compare Source](https://github.com/remix-run/react-router/compare/react-router@8.5.0...react-router@8.5.1) ##### Patch Changes - Fix `URIError: URI malformed` when an `ssr: false` dev server receives a URL path with a malformed percent-encoding ([#&#8203;15649](https://github.com/remix-run/react-router/pull/15649)) - Bound server route manifest processing for paths with expensive route expansion ([#&#8203;15703](https://github.com/remix-run/react-router/pull/15703)) - Fall back to initial route discovery during server rendering and RSC document/data requests - Account for the number and depth of candidate branches when using regex matching - Encode commas within paths sent to the lazy route discovery manifest endpoint so routes with commas in their paths are discovered correctly ([#&#8203;15640](https://github.com/remix-run/react-router/pull/15640)) - Fix fetcher revalidation errors bubbling to the root error boundary instead of the nearest boundary above the route that owns the fetcher ([#&#8203;15676](https://github.com/remix-run/react-router/pull/15676)) - Avoid duplicate history entries when posting a `<Form>` to the current URL with an encoded `action` ([#&#8203;15679](https://github.com/remix-run/react-router/pull/15679)) - Replace the current history entry when the `action` contains characters that get percent-encoded, such as spaces or non-ASCII characters - Fix an unhandled promise rejection when the browser skips a `viewTransition` navigation, for example in a hidden tab ([#&#8203;15582](https://github.com/remix-run/react-router/pull/15582)) - Bubble rejected `lazy.Component` imports on loader-less routes to the nearest error boundary ([#&#8203;15658](https://github.com/remix-run/react-router/pull/15658)) - Render the error boundary instead of a blank page - Preserve pending fetcher mutation revalidation when an older navigation or background reload completes to prevent stale loader data ([#&#8203;15686](https://github.com/remix-run/react-router/pull/15686)) - Keep newer fetcher loads cancellable and preserve them when earlier revalidations finish or abort, preventing older responses from overwriting fresh fetcher data - Retry rejected `lazy` route imports instead of caching failures permanently ([#&#8203;15689](https://github.com/remix-run/react-router/pull/15689)) - Revalidate loader data when a fetcher action redirect is not followed ([#&#8203;15557](https://github.com/remix-run/react-router/pull/15557)) - Revalidate when an action redirect is ignored because a newer navigation started or the fetcher unmounted while the action was running - Include shared parent loaders when another navigation completed while the action was running - Continue to respect `shouldRevalidate` - Return fetchers to `idle` when a revalidation completes a pending navigation started by another fetcher's redirect - Avoid adding an incompatible `document.startViewTransition()` overload to the global `Document` type ([#&#8203;15680](https://github.com/remix-run/react-router/pull/15680)) - Allow transition results to be assigned to the DOM `ViewTransition` type - Skip `deleteData` in `destroySession` when the session has no ID ([#&#8203;15639](https://github.com/remix-run/react-router/pull/15639)) - Avoid failures when destroying a session without a cookie on storage that rejects an empty key - Surface the host's 404 response when a SPA fallback route has no prerendered data ([#&#8203;15646](https://github.com/remix-run/react-router/pull/15646)) - Request single-fetch `.data` files for hydrating routes with a server `loader` in an `ssr: false` app with a `prerender` config - Avoid the internal "No result found for routeId" error for non-prerendered parameterized paths served via the SPA fallback - Improve turbo-stream decoding validation and object property handling ([18e1fbd](https://github.com/remix-run/react-router/commit/18e1fbd)) ##### Unstable Changes ⚠️ *[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use* - Add an opt-in `<Await unstable_promise={promise}>` implementation based on React's `use()` API ([#&#8203;15678](https://github.com/remix-run/react-router/pull/15678)) - Use `React.use` instead of React Router's internal promise tracking - Accept promise-like values and retain `errorElement`, `useAsyncValue`, and `useAsyncError` support - Handle only promise rejections with `errorElement` when using `unstable_promise`, allowing child render errors to bubble to the nearest React error boundary - Track streamed promises during decoding so settled server content stays visible during hydration updates with either Await API or direct `React.use()` - Fix `URIError: URI malformed` when an API-only (`ssr: "unstable_api-only"`) server receives a URL path with a malformed percent-encoding ([#&#8203;15649](https://github.com/remix-run/react-router/pull/15649)) - Fix duplicate headers when throwing a redirect from an RSC server function ([#&#8203;15667](https://github.com/remix-run/react-router/pull/15667)) ### [`v8.5.0`](https://github.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#v850) [Compare Source](https://github.com/remix-run/react-router/compare/react-router@8.4.0...react-router@8.5.0) ##### Minor Changes - Deprecate React Router's view transition APIs in favor of React's `<ViewTransition>` component, available in React 19.3 and later ([#&#8203;15493](https://github.com/remix-run/react-router/pull/15493)) - Deprecate the `viewTransition` props/options, `useViewTransitionState`, and `NavLink`'s `isTransitioning` render prop and `transitioning` class - Preserve existing behavior, including support for older React versions - See the [migration guide](https://reactrouter.com/how-to/view-transitions) for a navigation example and compatibility considerations ##### Patch Changes - Fix `<Await>` failing to server render promises decoded from an RSC payload, which caused the Suspense boundary to switch to client rendering ([#&#8203;15597](https://github.com/remix-run/react-router/pull/15597)) - Declare `@types/react` and `@types/react-dom` as optional peer dependencies so the shipped type definitions resolve React types under strict (non-hoisted) node_modules layouts ([#&#8203;15528](https://github.com/remix-run/react-router/pull/15528)) - Fix the `unstable_useRouterState` documentation example to call the imported alias ([#&#8203;15535](https://github.com/remix-run/react-router/pull/15535)) - Render the `HydrateFallback` of a route discovered through `patchRoutesOnNavigation` during initial hydration ([#&#8203;15537](https://github.com/remix-run/react-router/pull/15537)) - Routes discovered during initial hydration are now exposed in `state.matches` while their loaders run, so `<RouterProvider>` renders down to the discovered route's `HydrateFallback` instead of rendering nothing - Fix router state recovery when updates occur before `RouterProvider` subscribes, including when other subscribers are already attached, and report current client errors once without replaying server errors during hydration ([#&#8203;15637](https://github.com/remix-run/react-router/pull/15637)) - Fix `matchPath` not treating a static segment as optional when it contains characters outside `[\w-]` ([#&#8203;15425](https://github.com/remix-run/react-router/pull/15425)) - Fix an RSC server crash when a client aborts a document request while the HTML stream waits for the RSC payload ([#&#8203;15612](https://github.com/remix-run/react-router/pull/15612)) - Stop revalidating a fetcher after `fetcher.reset()`, so its cleared data no longer comes back on the next revalidation ([#&#8203;15633](https://github.com/remix-run/react-router/pull/15633)) ##### Unstable Changes ⚠️ *[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use* - Add an `unstable_fetch` prop to `<HydratedRouter>` to customize JavaScript-issued manifest and server data requests in conventional Framework Mode ([#&#8203;15586](https://github.com/remix-run/react-router/pull/15586)) - The function receives the intended request as well as context identifying the type of request - Data request context includes `navigationType` (`"PUSH"`, `"REPLACE"`, or `"POP"` for navigation-initiated requests, including reloaded fetchers; `null` otherwise) - Data strategies receive equivalent metadata through `unstable_initiator` and `unstable_navigationType` - The custom fetch context is a discriminated union, so narrowing `type` to `"navigation"` guarantees a non-null `navigationType`, while other data requests have a `null` `navigationType` - Fetchers reloaded after an initialization redirect retain the `"initialization"` type and include their fetcher key - Like other router initialization options, the implementation is captured when the singleton router is created and thus subsequent prop changes are ignored - Browser-managed data prefetches from `<Link prefetch>` use native `<link rel="prefetch">` elements and do not call the custom implementation - Use the callback for custom fetch options, custom headers, safe request retries, or response header inspection - Return response bodies unchanged so React Router can decode its manifest and Turbo Stream data protocols - Support API-only Framework Mode with runtime server data loading, actions, revalidation, and lazy route discovery ([#&#8203;15601](https://github.com/remix-run/react-router/pull/15601)) - Hydrate prerendered pages from build-time data and fetch server loader data when hydrating a SPA fallback - Preserve normal loader revalidation and server-action support for eagerly loaded and lazily discovered routes, and honor loader opt-outs when making server data requests - Add `unstable_useRouteDiscovery` for application-controlled route discovery in conventional Framework Mode ([#&#8203;15602](https://github.com/remix-run/react-router/pull/15602)) - Discover selected destinations or load the running client's full route manifest without loading route modules - Compose manifest-mismatch handlers, with shared recovery and cancellation that preserves application state - Keep full-manifest failures catchable without rendering error boundaries, whether mismatch handlers use the hook or event's `loadAllRoutes()` - Cancel pending revalidation alongside a canceled navigation, retaining existing data and settling interrupted fetchers before restoring Back/Forward history - Enable `future.unstable_customRouteDiscovery` to opt in - Apps without the flag retain existing discovery behavior - Call `event.defaultBehavior()` from a custom mismatch handler to explicitly run built-in recovery - Return middleware short-circuit responses as-is for document requests in RSC modes, including resource routes, instead of decoding non-RSC bodies as Flight ([#&#8203;15628](https://github.com/remix-run/react-router/pull/15628)) - Include server middleware in both eager and lazy RSC route configuration types - Preserve HTML rendering for cached Flight responses returned by middleware, and pass through raw responses that replace the result of `next()` ### [`v8.4.0`](https://github.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#v840) [Compare Source](https://github.com/remix-run/react-router/compare/react-router@8.3.1...react-router@8.4.0) ##### Minor Changes - Deprecate the `createStaticRouter({ branches })` option ([#&#8203;15297](https://github.com/remix-run/react-router/pull/15297)) - `createStaticRouter` now caches route branches internally, ignores `branches`, and logs a deprecation warning when the option is provided - The deprecated `EntryContext.branches` property remains available for compatibility but is always an empty array ##### Patch Changes - Prevent stale route discovery during manifest version-mismatch recovery ([#&#8203;15489](https://github.com/remix-run/react-router/pull/15489)) - Keep concurrent manifest responses pending while a document reload is in progress - Report a discovery error when a previous reload failed to resolve a version mismatch instead of loading a stale route or reloading repeatedly - Fail pending requests if a document reload does not complete within five seconds or the document is restored from the back-forward cache, allowing subsequent requests to recover - Preserve lazy route module import errors during SPA navigations instead of replacing them with a missing `dataStrategy` result error ([#&#8203;15464](https://github.com/remix-run/react-router/pull/15464)) - Switch to more granular internal router contexts to avoid unnecessary route component re-renders when unrelated data router state changes ([#&#8203;15376](https://github.com/remix-run/react-router/pull/15376)) - ⚠️ This contains some breaking changes to exported `UNSAFE_` contexts, so please review carefully if you are using those unsafe exports - Correctly escape streamed RSC redirect locations in meta tag attributes ([#&#8203;15491](https://github.com/remix-run/react-router/pull/15491)) - Avoid unintended `document.startViewTransition` calls during initial hydration and `router.revalidate()` calls ([#&#8203;15484](https://github.com/remix-run/react-router/pull/15484)) - Fix `SingleFetchNoResultError` thrown when a fetcher revalidates against a splat route during lazy route discovery ([#&#8203;15395](https://github.com/remix-run/react-router/pull/15395)) - Track discovery per fetcher load so revalidation waits for the current load's discovery, even when the fetcher key is reused, while still restarting interrupted loaders after discovery completes - Preserve the underlying decode failure as the `cause` of the `Unable to decode turbo-stream response` error ([#&#8203;15450](https://github.com/remix-run/react-router/pull/15450)) ##### Unstable Changes ⚠️ *[Unstable features](https://reactrouter.com/community/api-development-strategy#unstable-flags) are not recommended for production use* - Add a Data Mode `future.unstable_routePatternMatching` flag for more efficient route matching powered by `@remix-run/route-pattern` ([#&#8203;15298](https://github.com/remix-run/react-router/pull/15298)) - Add an `unstable_validateParams` route field to reject invalid parameter values and continue matching - Document access control requirements for RSC Server Functions ([#&#8203;15490](https://github.com/remix-run/react-router/pull/15490)) - Treat every Server Function as a public endpoint that must perform all of its own access control checks - Recommend route actions when access control should be provided by route middleware ### [`v8.3.1`](https://github.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#v831) [Compare Source](https://github.com/remix-run/react-router/compare/react-router@8.3.0...react-router@8.3.1) ##### Patch Changes - Fix `Expected fetcher: <key>` error thrown on navigation when a fetcher is aborted during its post-action revalidation ([#&#8203;15365](https://github.com/remix-run/react-router/pull/15365)) - Fix lazy route discovery caching a path as discovered when the triggering navigation was aborted after the manifest response settled but before the route tree was patched, which permanently (for the session) shadowed the real route behind a catch-all or produced 404s on every subsequent visit ([#&#8203;15399](https://github.com/remix-run/react-router/pull/15399)) - Improve route matching performance for long paths ([#&#8203;15417](https://github.com/remix-run/react-router/pull/15417)) - Improve validation of action request origins ([#&#8203;15419](https://github.com/remix-run/react-router/pull/15419)) - Fix `<ScrollRestoration>` leaving `history.scrollRestoration` set to `"auto"` after a bfcache restore, which let the browser restore scroll on subsequent history traversals before the destination route had rendered ([#&#8203;15397](https://github.com/remix-run/react-router/pull/15397)) - Properly respect the `relative` option in `useSubmit`/`fetcher.submit` when resolivng the `action` path ([#&#8203;15400](https://github.com/remix-run/react-router/pull/15400)) - Add additional URL validation on client side navigations/redirects ([#&#8203;15445](https://github.com/remix-run/react-router/pull/15445)) </details> --- ### 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 this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC41MS4yIiwidXBkYXRlZEluVmVyIjoiNDQuMjUyLjkiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
Renovate: Update dependency react-router to v8.3.1
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 3s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
289f6b2e77
renovate-bot force-pushed renovate/react-router-8.x-lockfile from 289f6b2e77
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 3s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
to 39cfe09ba8
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 9s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
2026-09-16 00:03:33 +00:00
Compare
renovate-bot changed title from Renovate: Update dependency react-router to v8.3.1 to Renovate: Update dependency react-router to v8.4.0 2026-09-16 00:03:45 +00:00
renovate-bot force-pushed renovate/react-router-8.x-lockfile from 39cfe09ba8
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 9s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
to a64793a14a
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 3s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
2026-10-20 00:03:26 +00:00
Compare
renovate-bot changed title from Renovate: Update dependency react-router to v8.4.0 to Renovate: Update dependency react-router to v8.5.0 2026-10-20 00:03:38 +00:00
renovate-bot force-pushed renovate/react-router-8.x-lockfile from a64793a14a
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 3s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
to e58a8dc08f
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 7s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
2026-10-28 00:03:16 +00:00
Compare
renovate-bot changed title from Renovate: Update dependency react-router to v8.5.0 to Renovate: Update dependency react-router to v8.5.1 2026-10-28 00:03:27 +00:00
renovate-bot force-pushed renovate/react-router-8.x-lockfile from e58a8dc08f
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 7s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
to cfefb62392
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 3s
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
2026-11-19 09:03:01 +00:00
Compare
renovate-bot changed title from Renovate: Update dependency react-router to v8.5.1 to Renovate: Update dependency react-router to v8.5.2 2026-11-19 09:03:06 +00:00
All checks were successful
Web Deployment Container / determine-workflow (pull_request) Successful in 3s
Required
Details
Web Deployment Container / nonprod-deploy (dev) (pull_request) Has been skipped
Required
Details
Web Deployment Container / prod-deploy (dev) (pull_request) Has been skipped
Required
Details
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/react-router-8.x-lockfile:renovate/react-router-8.x-lockfile
git switch renovate/react-router-8.x-lockfile
Sign in to join this conversation.
No description provided.