Zum Inhalt springen

React Router Updates & Release Notes

Einträge
59
Quellen
1
Zuletzt aktualisiert

Folge React Router, um die Release Notes in deinen Feed zu holen.

React Router von Remix

v8.5.3

Date: 2026-11-24

Patch Changes

  • react-router - Forward all NavigateOptions from <RouterProvider>'s navigator.push() and navigator.replace() to router.navigate() (#15781)
    • Options such as mask, defaultShouldRevalidate, flushSync, and viewTransition now reach the router from <Link>, useNavigate(), and useSearchParams() inside descendant <Routes> in Data and Framework modes
  • react-router - Prevent fetcher action revalidation from completing a navigation with stale route matches while lazy route discovery is pending (#15731)
  • react-router - Fix a circular type error when arrow function route components access matches from Route.ComponentProps (#15163)
    • Use the current route's loaderData type directly so TypeScript can resolve matches without evaluating the component's own props again
  • react-router - Fix useBlocker blocking a second time when the destination route updates search params in a mount effect (#15538)
  • react-router - Read encType and formEncType case-insensitively in <Form> and useSubmit (#15776)
    • Submit Multipart/Form-Data as multipart/form-data …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

v8.5.2

Date: 2026-11-18

Patch Changes

  • react-router - 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
  • react-router - 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
  • react-router - 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
  • react-router - Fix submissions to root form actions containing search parameters or a hash when a basename is configured (#15725)
  • react-router - 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) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

v8.5.1

Date: 2026-10-27

What's Changed

<Await unstable_promise>

In Data and Framework modes, including their unstable RSC variants, client components can opt into React's use() API with <Await unstable_promise>. This keeps support for render-prop children, useAsyncValue, and useAsyncError while accepting promise-like values without modifying the source promise.

Warning: The unstable_promise prop is unstable and may change in minor or patch releases.

import { Suspense } from "react";
import { Await } from "react-router";

<Suspense fallback={<p>Loading reviews...</p>}>
  <Await
    unstable_promise={reviewsPromise}
    errorElement={<p>Could not load reviews</p>}
  >
    {(reviews) => <Reviews items={reviews} />}
  </Await>
</Suspense>;

Pass exactly one of resolve or unstable_promise; the existing resolve API remains supported. With unstable_promise, errorElement handles promise rejections, while errors thrown when rendering children bubble to the nearest React error boundary.

Streamed promises are also tracked during decoding so settled server content stays visible during hydration updates when using either <Await> API or React.use() directly.

Patch Changes

  • react-router - Fix URIError: URI malformed when an ssr: false dev server receives a URL path with a malformed percent-encoding (#15649) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

v8.5.0

Date: 2026-10-19

What's Changed

View Transition Deprecations

React Router's view transition APIs are now marked deprecated in favor of React's <ViewTransition> component, available in React 19.3+. The existing APIs will continue to work for the duration of React Router v8 and will be removed in v9.

To use <ViewTransition>, wrap it around an <Outlet> in a persistent layout:

import { ViewTransition } from "react";
import { Outlet } from "react-router";

export default function Layout() {
  return (
    <ViewTransition>
      <Outlet />
    </ViewTransition>
  );
}

When migrating, remove the viewTransition props/options and replace useViewTransitionState, NavLink's isTransitioning, and .transitioning styles with React's View Transition classes. Note using <ViewTransition> requires React transitions be enabled, so do not set useTransitions={false} on your router component. See the migration guide for examples and compatibility considerations.

API-only Mode (unstable)

Framework Mode can now serve static HTML while retaining a runtime server for loaders, actions, revalidation, and lazy route discovery. This allows you to deploy your static HTML files to a CDN on one origin while having them hit server loader/actions on a runtime server potentially on another origin.

Enable API-only Mode in react-router.config.ts:

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 8.4.0 mit weniger Re-Renders und effizienterem Routing

React Router 8.4.0 reduziert Re-Renders durch feinere Kontexte und bietet ein neues, effizienteres Routen-Matching als instabile Option.

Date: 2026-09-15

What's Changed

Reduced Route Component Re-renders

In 8.4.0, we reworked our internal data router contexts to be more granular which will reduce re-renders for components using hooks to access only some router state. For example, your component won't automatically re-render when navigation.state transitions to loading if it only calls useLocation. 4 internal contexts are now used:

  • Current location info (useLocation, useSearchParams, useMatches)
  • Pending navigation/revalidation info (useNavigation, useRevalidation)
  • Router loader/action data (useLoaderData, useActionData)
  • Fetcher info (useFetcher, useFetchers)

More Efficient Route Matching (unstable)

Data Mode can now opt into a more efficient route matcher powered by @remix-run/route-pattern. Synthetic Chromium benchmarks reduced navigation and fetcher completion times by ~19–38% with 100 routes and ~71–88% with 1,000 routes, excluding network latency and React rendering.

Route definitions and path generation APIs such as generatePath and href continue to use React Router path syntax. Before enabling the flag, call unstable_preloadRoutePattern() so applications that do not opt in avoid downloading the new matcher.

This also comes with a new unstable_validateParams route field that accepts keyed regular expressions. When a parameter fails validation, matching continues to later routes. Optional parameters that are not present are not validated. …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 8.3.1 behebt Fehler

React Router 8.3.1 behebt Fehler bei abgebrochenen Fetchers, Lazy-Routen-Erkennung, Scroll-Wiederherstellung und Aktion-URL-Auflösung und verbessert die Route-Matching-Leistung.

Date: 2026-08-27

Patch Changes

  • react-router - Fix Expected fetcher: <key> error thrown on navigation when a fetcher is aborted during its post-action revalidation (#15365)
  • react-router - 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)
  • react-router - Improve route matching performance for long paths (#15417)
  • react-router - Improve validation of action request origins (#15419)
  • react-router - 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)
  • react-router - Properly respect the relative option in useSubmit/fetcher.submit when resolivng the action path (#15400) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 8.3.0 mit RSC-Updates und Pfadkodierung

React Router 8.3.0 aktualisiert RSC-Einträge, startet Dev-Server mit --conditions=development und kodiert Pfadparameter gemäß RFC 3986.

Date: 2026-07-22

What's Changed

RSC Entry Updates

This release includes several updates for unstable RSC apps that use custom entry files. Apps using the default RSC Framework entries do not need any changes.

If you maintain custom RSC entries, review the generated unstable change notes for the new client version, subresource integrity, and CSP nonce wiring. Custom entry.rsc.tsx files should pass the generated client version to unstable_matchRSCServerRequest, and custom entry.ssr.tsx files may need to pass the generated import map integrity data and request nonce through React's HTML renderer.

Minor Changes

  • @react-router/dev - Restart react-router dev with --conditions=development when not already configured (#15291)

Patch Changes

  • react-router - Encode path params in href/generatePath per RFC 3986 path-segment rules instead of encodeURIComponent (#15310)
    • Characters that are valid literally in a path segment ($ & + , ; = : @ — RFC 3986 pchar) are no longer percent-encoded, so values like a semver build 1.0.0+1 interpolate unchanged instead of becoming 1.0.0%2B1
    • Structural/unsafe characters (/ ? # %, whitespace, non-ASCII) are still escaped exactly as before …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v8.2.0: Web-Streams-Standard-Server-Entry

Für Nicht-Node-Apps ist der Web-Streams-Standard-Server-Entry verfügbar; Node-Apps können ihn über ein neues Flag aktivieren, was einen leichten Leistungsvorteil bringen kann.

Date: 2026-07-08

What's Changed

Web Streams Default Server Entry

Non-Node runtime Framework Mode apps no longer need a custom entry.server.tsx file using React's renderToReadableStream API. Apps with @react-router/{node,express,serve} dependencies will continue to default to renderToPipeableStream, while non-Node apps default to renderToReadableStream.

Because Web Streams are stable in Node 22+, Node apps can also opt-into the Web Streams default entry with the new future.unstable_enableNodeReadableStream flag:

import type { Config } from "@react-router/dev/config";

export default {
  future: {
    unstable_enableNodeReadableStream: true,
  },
} satisfies Config;

This flag has no effect if you have a custom entry.server.tsx keep using their custom entry file. It only applies to the default entry used if one doesn't exist.

Node apps opting-into the Web Streams API might even see a small performance boost because React Router already uses Web Streams internally, so this avoids additional conversions between Web/Node streams. If you see perf changes one way or another upon adopting this flag, please let us know!

Minor Changes

  • @react-router/dev - Add a Web Streams default server entry for non-Node Framework mode apps (#15290) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v8.1.0: Agent Skills und Beobachtbarkeits-Metadaten

create-react-router kann jetzt Agent Skills einrichten, und Instrumentierungs-Ergebnisse enthalten Metadaten wie Statuscodes für bessere Beobachtbarkeit.

Date: 2026-06-29

What's Changed

Agent Skills Installation via create-react-router

create-react-router can now setup the React Router Agent Skill in your new project. Interactive shells will issue a prompt on whether to include the skills, and they will be included by default with when running with --yes or in non-interactive shells. You can skip the skill addition with the --no-agent-skills CLI flag.

Observability Metadata

The Instrumentation APIs info parameter usually corresponds roughly to the inputs to the thing being instrumented (handler, loader, etc.). For route level instrumentations such as loaders, this contains useful information like the pattern (i.e., /blog/:slug) that allows you to report information that is easily aggregated by pattern, instead of having to manually deduce one from the request url.

However, for outer layers such as the handler or a router navigate call - we can't provide a pattern because we haven't yet done any route matching, so it wasn't easy to report at those levels based on a generic route pattern.

The internal instrumentation results now contain relevant metadata in result.meta for these outer instrumentation layers. For server handler instrumentations, we also expose the statusCode of the outgoing HTTP response:

export const instrumentations = [
  {
    handler(handler) { …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v8.0.1: Entfernung veralteter Typ-Export

Der veraltete AppLoadContext-Typ-Export wurde entfernt, da Middleware immer aktiviert ist und der Server-Kontext über RouterContextProvider bereitgestellt wird.

Date: 2026-06-18

Patch Changes

  • react-router - Remove the obsolete AppLoadContext type export accidentally left over from v7 now that middleware is always enabled and server request context is provided through RouterContextProvider. (#15207)

Full Changelog: v8.0.0...v8.0.1

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v8.0.0: Hauptversion mit neuen Mindestanforderungen

React Router v8 ist erschienen, entfernt alle v8-Future-Flags und setzt neue Mindestversionen, darunter Node 22.22.0+.

Date: 2026-06-17

What's Changed

React Router v8 is here!

We introduced a new Open Governance model last year and this marks the first major release on our new planned yearly major release cadence. We chose the June timeframe this year to align with the EOL timeframe for Node 20. Node 22 is scheduled to reach EOL in the May 2027 timeframe so we'll be aiming for a v9 release around the same time next year.

Our API Development Strategy aims to make major releases relatively boring by introducing breaking changes ahead of time behind Future Flags. If you've adopted all active future flags in v7, then from a React Router API surface you're in good shape for v8. All future.v8_* flags have been removed (or lifted to a top-level config) and their behaviors are now the default.

Baseline Support

React Router v8 updates the following minimum supported versions:

  • Node 22.22.0+
    • Starting with v8, React Router will officially support all Active LTS node versions and only the latest minor branch of Maintenance LTS versions
    • This better allows us to bump minimum Maintenance LTS versions to account for newly released security patches
    • It also allows us to more quickly and easily adopt new Active LTS features backported to Maintenance LTS lines …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.18.0: CSRF-Prüfung korrigiert

Die CSRF-Prüfung verwendet jetzt den Host aus der Request-URL statt der HTTP-Header, was hinter Reverse-Proxys Anpassungen erfordern kann; eine neue Option für Architect-Adapter wurde hinzugefügt.

Date: 2026-06-16

What's Changed

CSRF Check Logic Fix

We made a bug fix in our underlying CSRF checks in this release that may be a "breaking bug fix" for some users deployed behind a reverse proxy. The CSRF check now checks directly against the host in the request url provided, instead of looking directly at HTTP headers which is an adapter concern. If your adapter is not setting the expected host in the request URL, you may need to add the new internal host to your allowedActionOrigins config. This is most likely to occur in @react-router/serve apps or @react-router/express apps without the trust proxy setting enabled. We recommend testing this against application mutation requests as part of your upgrade.

Minor Changes

  • @react-router/architect - Add a useRequestContextDomainName option to createRequestHandler to derive request URL hosts from the API Gateway request context (#15185)
    • This flag will become the default behavior in v8, so it is recommended to adopt to prepare for and to v8 better align with your deployment architecture and rely less on manual header parsing in the adapter
    • See the docs for more information

Patch Changes …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.17.0: Dokumentation im Paket und Optimierung

Offizielle Markdown-Dokumentation ist nun im react-router-Paket enthalten, Warnmeldungen zu Future-Flags werden nur einmal geloggt und RSC-Exports werden vom Optimierer ausgeschlossen.

Date: 2026-06-04

Minor Changes

  • react-router - 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/)

Patch Changes

  • @react-router/dev - Fix future flag warning URLs and only log each future flag warning one time (#15138)

Unstable Changes

⚠️ Unstable features are not recommended for production use

  • @react-router/dev - Prevent RSC route module server exports from being scanned by the client dependency optimizer when future.unstable_optimizeDeps is enabled. (#15005)

Full Changelog: v7.16.0...v7.17.0

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.16.0: Stabilisierung Trailing-Slash-Flag

Das unstable_trailingSlashAwareDataRequests-Flag wurde als v8_trailingSlashAwareDataRequests stabilisiert, mit Warnungen und einigen Fehlerbehebungen.

Date: 2026-05-28

Minor Changes

  • react-router - Stabilize future.unstable_trailingSlashAwareDataRequests as future.v8_trailingSlashAwareDataRequests (#15098)

  • @react-router/dev - Stabilize future.unstable_trailingSlashAwareDataRequests as future.v8_trailingSlashAwareDataRequests (#15098)

    • The unstable flag is no longer supported and will error during config resolution
  • @react-router/dev - Log future flag warnings for upcoming React Router v8 flags (#15029)

    • v8_middleware, v8_splitRouteModules, v8_viteEnvironmentApi, v8_passThroughRequests, v8_trailingSlashAwareDataRequests

Patch Changes

  • react-router - Disable manifest path when lazy route dicovery is disabled (#15068)

  • react-router - 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.
  • react-router - Fix useNavigation() return type to preserve discriminated union across navigation states (#15095) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.15.1: Neuer useRouterState-Hook (unstable)

Der unstable_useRouterState-Hook bündelt Zugriffe auf aktive und anstehende Router-Zustände und ersetzt damit mehrere vorhandene Hooks.

Date: 2026-05-14

What's New

useRouterState (unstable)

Following our Less is More design goal, this release includes a new unstable_useRouterState() hook (Framework + Data Mode) that consolidates access to active and pending router states (RFC, Roadmap Issue).

This should allow you to consolidate usages of a bunch of different hooks which will likely be marked deprecated later on in v8 and potentially removed in an eventual v9:

let { active, pending } = unstable_useRouterState();

// Active is always populated with the current location
active.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 navigation
pending.location; // replaces `useNavigation().location`
pending.searchParams; // equivalent to `new URLSearchParams(useNavigation().search)`
pending.params; // Not directly accessible today
pending.matches; // Not directly accessible today
pending.type; // Not directly accessible today
pending.state; // replaces `useNavigation().state`
pending.formMethod; // replaces useNavigation().formMethod …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.15.0: Stabilisierungen und Routen-Optimierung

Viele unstable APIs wurden in Vorbereitung auf v8 stabilisiert, und die Routenzuordnung wurde für bessere Leistung optimiert.

Date: 2026-05-05

What's Changed

Stabilizations

We've stabilized a bunch of APIs in this release in preparation for a React Router v8 release hopefully in the next month or two. These flag/prop renames are breaking changes if you've already opted into the unstable APIs so please make sure you make the appropriate changes if so.

  • future.unstable_passThroughRequests → future.v8_passThroughRequests
  • future.unstable_subResourceIntegrity → top-level config.subResourceIntegrity
  • prerender.unstable_concurrency → prerender.concurrency
  • unstable_url → url (loader, action, middleware, instrumentation args)
  • unstable_instrumentations → instrumentations
    • Plus associated types (ServerInstrumentation, ClientInstrumentation, etc.)
  • unstable_pattern → pattern (loader, action, middleware, instrumentation args)
  • unstable_defaultShouldRevalidate → defaultShouldRevalidate
  • unstable_useTransitions → useTransitions
  • unstable_mask → mask (on <Link>, useLinkClickHandler, useNavigate, and Location)

Route matching optimizations

We've added a handful of route matching optimizations in this release for Framework and Data mode. The changes are mostly related to caching the internal flattened/ranked route branches and reducing additional calls to matchRoutes along the critical path. This should result in improved performance during both server-side request handling and client-side navigations.

Minor Changes …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.14.2: Fehlerbehebungen und Typverbesserungen

Benutzerdefinierte Fehlerserialisierung entfernt, Redirects bei fetcher.load korrekt behandelt, redundante Typen entfernt und generatePath-Typen verbessert.

Date: 2026-04-21

Patch Changes

  • react-router - 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.). (#14992)
  • react-router - Properly handle parent middleware redirects during fetcher.load (#14974)
  • react-router - Remove redundant Omit<RouterProviderProps, "flushSync"> from react-router/dom RouterProvider (#14874)
  • react-router - Improved types for generatePath's param arg (#14984)
    • Type errors when required params are omitted:

      // Before
      // Passes type checks, but throws at runtime 💥
      generatePath(":required", { required: null });
      
      // After
      generatePath(":required", { required: null });
      //                          ^^^^^^^^ Type 'null' is not assignable to type 'string'.ts(2322)
      
    • Allow omission of optional params:

      // Before
      generatePath(":optional?", {});
      //                         ^^ Property 'optional' is missing in type '{}' but required in type '{ optional: string | null | undefined; }'.ts(2741)
      
      // After
      generatePath(":optional?", {});
      ``` …
      

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router 7.14.1

Behebt einen möglichen Wettlauf beim Rendern von HydrateFallback, normalisiert doppelte Schrägstriche in Redirect-Pfaden und fügt TypeScript-6-Support hinzu.

Date: 2026-04-13

Patch Changes

  • react-router - 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 (#14497)
  • react-router - Normalize double-slashes in redirect paths (#14962)
  • @react-router/dev - Add TypeScript 6 support to peer dependency ranges (#14935)

Full Changelog: v7.14.0...v7.14.1

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router 7.14.0

Fügt Vite-8-Support hinzu, behebt einen Speicherleck in encodeViaTurboStream, entfernt Rekursion aus turbo-stream und unterstützt Prerendering mehrerer Server-Bundles.

Date: 2026-04-02

Minor Changes

  • Add support for Vite 8 (#14876)

Patch Changes

  • react-router - Remove recursion from vendored turbo-stream v2 implementation allowing for encoding/decoding of large payloads (#14838)
  • react-router - Fix encodeViaTurboStream memory leak via unremoved AbortSignal listener (#14900)
  • @react-router/dev - Support for prerendering multiple server bundles with v8_viteEnvironmentApi (#14921)

Unstable Changes

⚠️ Unstable features are not recommended for production use

  • @react-router/dev - Pre-rendering and SPA Mode support for RSC Framework Mode (#14907)
  • @react-router/dev - Update react-router reveal to support RSC Framework Mode for entry.client, entry.rsc, entry.ssr (#14904)
  • react-router - Support <Link prefetch> in RSC Framework Mode (#14902)
  • react-router - Add support for new route module exports in unstable RSC Framework Mode (#14901) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router 7.13.2

Führt ein instabiles Flag für unveränderte Request-Weitergabe ein, das die URL-Normalisierung deaktiviert und den raw-HTTP-Request an Handler übergibt.

Date: 2026-03-23

What's Changed

Pass-through Requests (unstable)

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). This release introduces a new future.unstable_passThroughRequests flag to disable this normalization and pass the raw HTTP request instance to your handlers.

In addition to reducing server-side overhead by eliminating multiple new Request() calls on the critical path, this also provides additional visibility to your route handlers/instrumentations allowing you to differentiate document from data requests.

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`
export async function loader({ request }: Route.LoaderArgs) {
  let url = new URL(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 logic
export async function loader({ request, unstable_url }: Route.LoaderArgs) {
  if (unstable_url.pathname === "/path") { …

Originalquelle(öffnet in neuem Tab)Problem melden