react-router
8.5.1 · 27 Oct 2026MIT75.4M / weekRepositorynpmAtom feed
Where each line stands
Plan an upgradeLatest releases
All 230 releases- 8.x · latest line
8.5.1
27 Oct 2026Fix
URIError: URI malformedwhen anssr: falsedev server receives a URL path with a malformed percent-encodingBound server route manifest processing for paths with expensive route expansion
Encode commas within paths sent to the lazy route discovery manifest endpoint so routes with commas in their paths are discovered correctly
Patch Changes
Fix
URIError: URI malformedwhen anssr: falsedev server receives a URL path with a malformed percent-encodingBound server route manifest processing for paths with expensive route expansion
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
Fix fetcher revalidation errors bubbling to the root error boundary instead of the nearest boundary above the route that owns the fetcher
Avoid duplicate history entries when posting a
<Form>to the current URL with an encodedactionReplace the current history entry when the
actioncontains characters that get percent-encoded, such as spaces or non-ASCII characters
Fix an unhandled promise rejection when the browser skips a
viewTransitionnavigation, for example in a hidden tabBubble rejected
lazy.Componentimports on loader-less routes to the nearest error boundaryRender 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
Keep newer fetcher loads cancellable and preserve them when earlier revalidations finish or abort, preventing older responses from overwriting fresh fetcher data
Retry rejected
lazyroute imports instead of caching failures permanentlyRevalidate loader data when a fetcher action redirect is not followed
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
shouldRevalidateReturn fetchers to
idlewhen a revalidation completes a pending navigation started by another fetcher's redirect
Avoid adding an incompatible
document.startViewTransition()overload to the globalDocumenttypeAllow transition results to be assigned to the DOM
ViewTransitiontype
Skip
deleteDataindestroySessionwhen the session has no IDAvoid 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
Request single-fetch
.datafiles for hydrating routes with a serverloaderin anssr: falseapp with aprerenderconfigAvoid 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
Unstable Changes
⚠️ Unstable features are not recommended for production use
Add an opt-in
<Await unstable_promise={promise}>implementation based on React'suse()APIUse
React.useinstead of React Router's internal promise trackingAccept promise-like values and retain
errorElement,useAsyncValue, anduseAsyncErrorsupportHandle only promise rejections with
errorElementwhen usingunstable_promise, allowing child render errors to bubble to the nearest React error boundaryTrack streamed promises during decoding so settled server content stays visible during hydration updates with either Await API or direct
React.use()
Fix
URIError: URI malformedwhen an API-only (ssr: "unstable_api-only") server receives a URL path with a malformed percent-encodingFix duplicate headers when throwing a redirect from an RSC server function
8.5.0
19 Oct 2026- Deprecated
Deprecate React Router's view transition APIs in favor of React's
<ViewTransition>component, available in React 19.3 and later Fix
<Await>failing to server render promises decoded from an RSC payload, which caused the Suspense boundary to switch to client renderingDeclare
@types/reactand@types/react-domas optional peer dependencies so the shipped type definitions resolve React types under strict (non-hoisted) node_modules layouts
Minor Changes
- Deprecated
Deprecate React Router's view transition APIs in favor of React's
<ViewTransition>component, available in React 19.3 and laterDeprecate the
viewTransitionprops/options,useViewTransitionState, andNavLink'sisTransitioningrender prop andtransitioningclassPreserve 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 renderingDeclare
@types/reactand@types/react-domas optional peer dependencies so the shipped type definitions resolve React types under strict (non-hoisted) node_modules layoutsFix the
unstable_useRouterStatedocumentation example to call the imported aliasRender the
HydrateFallbackof a route discovered throughpatchRoutesOnNavigationduring initial hydrationRoutes discovered during initial hydration are now exposed in
state.matcheswhile their loaders run, so<RouterProvider>renders down to the discovered route'sHydrateFallbackinstead of rendering nothing
Fix router state recovery when updates occur before
RouterProvidersubscribes, including when other subscribers are already attached, and report current client errors once without replaying server errors during hydrationFix
matchPathnot treating a static segment as optional when it contains characters outside[\w-]Fix an RSC server crash when a client aborts a document request while the HTML stream waits for the RSC payload
Stop revalidating a fetcher after
fetcher.reset(), so its cleared data no longer comes back on the next revalidation
Unstable Changes
⚠️ Unstable features are not recommended for production use
Add an
unstable_fetchprop to<HydratedRouter>to customize JavaScript-issued manifest and server data requests in conventional Framework ModeThe 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;nullotherwise)Data strategies receive equivalent metadata through
unstable_initiatorandunstable_navigationType
The custom fetch context is a discriminated union, so narrowing
typeto"navigation"guarantees a non-nullnavigationType, while other data requests have anullnavigationTypeFetchers 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 implementationUse 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
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_useRouteDiscoveryfor application-controlled route discovery in conventional Framework ModeDiscover 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_customRouteDiscoveryto opt inApps 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
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()
8.4.0
15 Sep 2026- Deprecated
Deprecate the
createStaticRouter({ branches })option Prevent stale route discovery during manifest version-mismatch recovery
Preserve lazy route module import errors during SPA navigations instead of replacing them with a missing
dataStrategyresult error
Minor Changes
- Deprecated
Deprecate the
createStaticRouter({ branches })optioncreateStaticRouternow caches route branches internally, ignoresbranches, and logs a deprecation warning when the option is providedThe deprecated
EntryContext.branchesproperty remains available for compatibility but is always an empty array
Patch Changes
Prevent stale route discovery during manifest version-mismatch recovery
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
dataStrategyresult errorSwitch to more granular internal router contexts to avoid unnecessary route component re-renders when unrelated data router state changes
⚠️ 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
Avoid unintended
document.startViewTransitioncalls during initial hydration androuter.revalidate()callsFix
SingleFetchNoResultErrorthrown when a fetcher revalidates against a splat route during lazy route discoveryTrack 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
causeof theUnable to decode turbo-stream responseerror
Unstable Changes
⚠️ Unstable features are not recommended for production use
Add a Data Mode
future.unstable_routePatternMatchingflag for more efficient route matching powered by@remix-run/route-patternAdd an
unstable_validateParamsroute field to reject invalid parameter values and continue matching
Document access control requirements for RSC Server Functions
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
Dependency tracking
Know when your own dependencies move
react-router had 18 security advisories in the last 12 months. inlinr emails you the day one touches a project of yours, with the version that fixes it.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Reading releases, release notes and advisories…
Registry facts last checked 18 Nov 2026. Releases and advisories last read 18 Nov 2026.