Zum Inhalt springen

Remix Release Notes

Einträge
59
Quellen
1
Zuletzt aktualisiert

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

React Router von Remix

Version 7.6.1 behebt mehrere Fehler

React Router 7.6.1 korrigiert Probleme bei matchRoutes, href-Ersetzungen mit Splats sowie 404-Fehler beim Lazy Route Discovery.

Date: 2025-05-25

Patch Changes

  • react-router - Partially revert optimization added in 7.1.4 to reduce calls to matchRoutes because it surfaced other issues (#13562)
  • react-router - Update Route.MetaArgs to reflect that data can be potentially undefined (#13563)
    • This is primarily for cases where a route loader threw an error to it's own ErrorBoundary, but it also arises in the case of a 404 which renders the root ErrorBoundary/meta but the root loader did not run because not routes matched
  • react-router - Avoid initial fetcher execution 404 error when Lazy Route Discovery is interrupted by a navigation (#13564)
  • react-router - Properly href replaces splats * (#13593)
    • href("/products/*", { "*": "/1/edit" }); // -> /products/1/edit
  • @react-router/architect - Update @architect/functions from ^5.2.0 to ^7.0.0 (#13556)
  • @react-router/dev - Prevent typegen with route files that are outside the app/ directory (#12996) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 7.6.0 mit Route-Discovery-Optionen

React Router 7.6.0 bietet neue Konfigurationsoptionen für das Lazy Route Discovery und automatische Typen für Zukunftssflags.

Date: 2025-05-08

What's Changed

routeDiscovery Config Option

We've added a new config option in 7.6.0 which grants you more control over the Lazy Route Discovery feature. You can now configure the /__manifest path if you're running multiple RR applications on the same server, or you can also disable the feature entirely if your application is small enough and the feature isn't necessary.

// react-router.config.ts

export default {
  // You can modify the manifest path used:
  routeDiscovery: { mode: "lazy", manifestPath: "/custom-manifest" }

  // Or you can disable this feature entirely and include all routes in the
  // manifest on initial document load:
  routeDiscovery: { mode: "initial" }

  // If you don't specify anything, the default config is as follows, which enables
  // Lazy Route Discovery and makes manifest requests to the `/__manifest` path:
  // routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }
} satisfies Config;

Automatic Types for Future Flags

Some future flags alter the way types should work in React Router. Previously, you had to remember to manually opt-in to the new types. For example, for future.unstable_middleware:

// react-router.config.ts

// Step 1: Enable middleware
export default {
  future: {
    unstable_middleware: true,
  },
};

// Step 2: Enable middleware types
declare module "react-router" {
  interface Future {
    unstable_middleware: true; // 👈 Enable middleware types
  }
}
``` …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 7.5.3 behebt Loader-Fehler

Version 7.5.3 behebt Probleme mit gelöschten loaderData bei bubbled Action-Fehlern und verarbeitet Redirects vom initialen clientLoader-Lauf.

Date: 2025-04-28

Patch Changes

  • react-router - Fix bug where bubbled action errors would result in loaderData being cleared at the handling ErrorBoundary route (#13476)
  • react-router - Handle redirects from clientLoader.hydrate initial load executions (#13477)

Full Changelog: v7.5.2...v7.5.3

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 7.5.2 schließt Sicherheitslücken

React Router 7.5.2 behebt zwei Sicherheitslücken, die Cache-Poisoning-Angriffe über spezielle Header ermöglichten.

Date: 2025-04-24

Security Notice

Fixed 2 security vulnerabilities that could result in cache-poisoning attacks by sending specific headers intended for build-time usage for SPA Mode and Pre-rendering (GHSA-f46r-rw29-r322, GHSA-cpj6-fhp6-mr6j).

Patch Changes

  • react-router - Adjust approach for Pre-rendering/SPA Mode via headers (#13453)
  • react-router - Update Single Fetch to also handle the 204 redirects used in ?_data requests in Remix v2 (#13364)
    • This allows applications to trigger a redirect on .data requests from outside the scope of React Router (i.e., an express/hono middleware) the same way they did in Remix v2 before Single Fetch was implemented
    • This is a bit of an escape hatch - the recommended way to handle this is redirecting from a root route middleware
    • To use this functionality, you may return from a .data request wih a response as follows:
      • Set a 204 status code
      • Set an X-Remix-Redirect: <new-location> header
      • Optionally, set X-Remix-Replace: true or X-Remix-Reload-Document: true headers to replicate replace()/redirectDocument() functionality …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 7.5.1 verbessert Lazy Loading

Version 7.5.1 überspringt HydrateFallback-Eigenschaften beim Lazy Loading nach der Hydration und behebt Revalidierungsprobleme bei Pre-Rendering.

Date: 2025-04-17

Patch Changes

  • react-router - When using the object-based route.lazy API, the HydrateFallback and hydrateFallbackElement properties are now skipped when lazy loading routes after hydration (#13376)

    • If you move the code for these properties into a separate file, since the hydrate properties were unused already (if the route wasn't present during hydration), you can avoid downloading them at all. For example:

      createBrowserRouter([
        {
          path: "/show/:showId",
          lazy: {
            loader: async () => (await import("./show.loader.js")).loader,
            Component: async () =>
              (await import("./show.component.js")).Component,
            HydrateFallback: async () =>
              (await import("./show.hydrate-fallback.js")).HydrateFallback,
          },
        },
      ]);
      
  • react-router - Fix single fetch bug where no revalidation request would be made when navigating upwards to a reused parent route (#13253)

  • react-router - Properly revalidate pre-rendered paths when param values change when using ssr:false + prerender configs (#13380)

  • react-router - Fix pre-rendering when a loader returns a redirect (#13365) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 7.5.0 mit neuem Lazy-API-Objekt

React Router 7.5.0 führt eine objektbasierte route.lazy-API für granulareres Lazy Loading ein und erweitert die wrangler-Unterstützung.

Date: 2025-04-04

What's Changed

route.lazy Object API

We've introduced a new route.lazy API which gives you more granular control over the lazy loading of route properties that you could not achieve with the route.lazy() function signature. This is useful for Framework mode and performance-critical library mode applications.

createBrowserRouter([
  {
    path: "/show/:showId",
    lazy: {
      loader: async () => (await import("./show.loader.js")).loader,
      action: async () => (await import("./show.action.js")).action,
      Component: async () => (await import("./show.component.js")).Component,
    },
  },
]);

⚠️ This is a breaking change if you have adopted the route.unstable_lazyMiddleware API which has been removed in favor of route.lazy.unstable_middleware. See the Unstable Changes section below for more information.

Minor Changes

  • react-router - Add granular object-based API for route.lazy to support lazy loading of individual route properties (#13294)

Patch Changes

  • @react-router/dev - Update optional wrangler peer dependency range to support wrangler v4 (#13258) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Version 7.4.1 behebt Sicherheitslücke

Version 7.4.1 behebt eine Sicherheitslücke bei der Port-Bereinigung von Host-Headern und verbessert die Validierung des x-forwarded-host-Headers.

Date: 2025-03-28

Security Notice

Fixed a security vulnerability that allowed URL manipulation and potential cache pollution via the Host and X-Forwarded-Host headers due to inadequate port sanitization (GHSA-4q56-crqp-v477/CVE-2025-31137).

Patch Changes

  • react-router - Dedupe calls to route.lazy functions (#13260)
  • @react-router/dev - Fix path in prerender error messages (#13257)
  • @react-router/dev - Fix typegen for virtual modules when moduleDetection is set to force (#13267)
  • @react-router/express - Better validation of x-forwarded-host header to prevent potential security issues (#13309)

Unstable Changes

⚠️ Unstable features are not recommended for production use

  • react-router - Fix types on unstable_MiddlewareFunction to avoid type errors when a middleware doesn't return a value (#13311)
  • react-router - Add support for route.unstable_lazyMiddleware function to allow lazy loading of middleware logic (#13210) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.4.0 veröffentlicht

Version 7.4.0 generiert Typen für das virtual:react-router/server-build-Modul, behebt mehrere Fehler in React Router und dem Dev-Paket und verbessert das Verhalten bei Middleware-Fehlern im instabilen Bereich.

Date: 2025-03-19

Minor Changes

  • @react-router/dev - Generate types for virtual:react-router/server-build module (#13152)

Patch Changes

  • react-router - Fix root loader data on initial load redirects in SPA mode (#13222)
  • react-router - Load ancestor pathless/index routes in lazy route discovery for upwards non-eager-discovery routing (#13203)
  • react-router - Fix shouldRevalidate behavior for clientLoader-only routes in ssr:true apps (#13221)
  • @react-router/dev - Fix conflicts with other Vite plugins that use the configureServer and/or configurePreviewServer hooks (#13184)

Unstable Changes

⚠️ Unstable features are not recommended for production use

  • react-router - If a middleware throws an error, ensure we only bubble the error itself via next() and are no longer leaking the MiddlewareError implementation detail (#13180)
    • ⚠️ This may be a breaking change if you are catch-ing errors thrown by the next() function in your middlewares …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.3.0 veröffentlicht

Version 7.3.0 fügt fetcherKey als Parameter hinzu, erkennt Manifest-Abweichungen nach Deployments und behebt mehrere Fehler in React Router und dem Dev-Paket.

Date: 2025-03-06

Minor Changes

  • Add fetcherKey as a parameter to patchRoutesOnNavigation (#13061)

Patch Changes

  • react-router - Detect and handle manifest-skew issues on new deploys during active sessions (#13061)
    • In framework mode, Lazy Route Discovery will now detect manifest version mismatches in active sessions after a new deploy
    • On navigations to undiscovered routes, this mismatch will trigger a document reload of the destination path
    • On fetcher calls to undiscovered routes, this mismatch will trigger a document reload of the current path
  • react-router - Skip resource route flow in dev server in SPA mode (#13113)
  • react-router - Fix single fetch _root.data requests when a basename is used (#12898)
  • react-router - Fix types for loaderData and actionData that contained Records (#13139)
    • ⚠️ This is a breaking change for users who have already adopted unstable_SerializesTo - see the note in the Unstable Changes section below for more information
  • @react-router/dev - Fix support for custom client build.rollupOptions.output.entryFileNames (#13098) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.2.0 mit typsicherem href-Utility

Version 7.2.0 bietet ein typsicheres href-Utility für Pfad-Autovervollständigung und Parameterprüfung sowie Vorab-Rendering mit SPA-Fallback für ssr:false.

Date: 2025-02-18

What's Changed

Type-safe href utility

In framework mode, we now provide you with a fully type-safe href utility to give you all the warm and fuzzy feelings of path auto-completion and param validation for links in your application:

import { href } from "react-router";

export default function Component() {
  const link = href("/blog/:slug", { slug: "my-first-post" });
  //                ^ type-safe!     ^ Also type-safe!

  return (
    <main>
      <Link to={href("/products/:id", { id: "asdf" })} />
      <NavLink to={href("/:lang?/about", { lang: "en" })} />
    </main>
  );
}

You'll now get type errors if you pass a bad path value or a bad param value:

const badPath = href("/not/a/valid/path");
//                   ^ Error!

const badParam = href("/blog/:slug", { oops: "bad param" });
//                                     ^ Error!

Prerendering with a SPA Fallback

This release enhances the ability to use a combination of pre-rendered paths alongside other paths that operate in "SPA Mode" when pre-rendering with ssr:false.

  • If you specify ssr:false without a prerender config, this is considered "SPA Mode" and the generated index.html file will only render down to the root route and will be able to hydrate for any valid application path …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.1.5 behebt Navigationsregression

Version 7.1.5 behebt eine Regression aus 7.1.4, die die Navigation zu Hash-Routen in Splat-Routen bei Lazy Route Discovery beeinträchtigte.

Date: 2025-01-31

Patch Changes

  • react-router - Fix regression introduced in 7.1.4 via #12800 that caused issues navigating to hash routes inside splat routes for applications using Lazy Route Discovery (patchRoutesOnNavigation) (#12927)

Full Changelog: v7.1.4...v7.1.5

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.1.4 mit mehreren Korrekturen

Version 7.1.4 korrigiert Windows-Pfadauflösung, Statuscodes ohne Body bei Single-Fetch, Header-Weitergabe und die Serialisierung von Resource-Routen.

Date: 2025-01-30

Patch Changes

  • @react-router/dev - Properly resolve Windows file paths to scan for Vite's dependency optimization when using the unstable_optimizeDeps future flag (#12637)
  • @react-router/dev - Fix prerendering when using a custom server - previously we ended up trying to import the users custom server when we actually want to import the virtual server build module (#12759)
  • react-router - Properly handle status codes that cannot have a body in single fetch responses (204, etc.) (#12760)
  • react-router - Properly bubble headers as errorHeaders when throwing a data() result (#12846)
    • Avoid duplication of Set-Cookie headers if also returned from headers
  • react-router - Stop erroring on resource routes that return raw strings/objects and instead serialize them as text/plain or application/json responses (#12848)
    • This only applies when accessed as a resource route without the .data extension
    • When accessed from a Single Fetch .data request, they will still be encoded via turbo-stream …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.1.2 mit mehreren Fehlerkorrekturen

Version 7.1.2 behebt Probleme mit Fetcher-Datenbereinigung, Redirect-Filterung und Vite-Konfiguration sowie React-Kontextfehler unter Node 22.10.0+.

Date: 2025-01-16

Patch Changes

  • react-router - Fix issue with fetcher data cleanup in the data layer on fetcher unmount (#12681)
  • react-router - Do not rely on symbol for filtering out redirect responses from loader data (#12694)
    • Previously, some projects were getting type checking errors like:
      error TS4058: Return type of exported function has or is using name 'redirectSymbol' from external module "node_modules/..." but cannot be named.
      
    • Now that symbols are not used for the redirect response type, these errors should no longer be present
  • @react-router/dev - Fix default external conditions in Vite v6 (#12644)
    • This fixes resolution issues with certain npm packages
  • @react-router/dev - Fix mismatch in prerendering html/data files when path is missing a leading slash (#12684)
  • @react-router/dev - Use module-sync server condition when enabled in the runtime. This fixes React context mismatches (e.g. useHref() may be used only in the context of a <Router> component.) during development on Node 22.10.0+ when using libraries that have a peer dependency on React Router (#12729) …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.1.0 mit Vite-6-Unterstützung

Version 7.1.0 fügt Unterstützung für Vite v6 hinzu und korrigiert Redirect-Verhalten, Typableitung und Initialisierung von NODE_ENV für React 19.

Date: 2024-12-20

Minor Changes

  • Add support for Vite v6 (#12469)

Patch Changes

  • react-router - Throw unwrapped Single Fetch redirect to align with pre-Single Fetch behavior (#12506)
  • react-router - Ignore redirects when inferring loader data types (#12527)
  • react-router - Remove <Link prefetch> warning which suffers from false positives in a lazy route discovery world (#12485)
  • create-react-router - Fix missing fs-extra dependency (#12556)
  • @react-router/dev/@react-router/serve - Properly initialize NODE_ENV if not already set for compatibility with React 19 (#12578)
  • @react-router/dev - Remove the leftover/unused abortDelay prop from ServerRouter and update the default entry.server.tsx to use the new streamTimeout value for Single Fetch (#12478)
    • The abortDelay functionality was removed in v7 as it was coupled to the defer implementation from Remix v2, but this removal of this prop was missed …

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

React Router v7.0.2 mit Typ- und Kompatibilitätsverbesserungen

Version 7.0.2 verbessert die Kompatibilität mit Peer-Abhängigkeiten, unterstützt Node16/NodeNext-Modulauflösung und generiert breitere Typen für Kind-Routen.

Date: 2024-12-02

Patch Changes

  • react-router - Temporarily only use one build in export map so packages can have a peer dependency on react router (#12437)
  • @react-router/dev - Support moduleResolution Node16 and NodeNext (#12440)
  • @react-router/dev - Generate wide matches and params types for child routes (#12397)
    • At runtime, matches includes child route matches and params include child route path parameters
    • But previously, we only generated types for parent routes and the current route in matches and params
    • To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information

Full Changelog: v7.0.1...v7.0.2

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Remix: React Router v7.0.1

Behoben: Typegen-Dateiüberwacher wird beim Neustart des Vite-Entwicklungsservers bereinigt und Route-Fehler werden als Prop an die ErrorBoundary übergeben.

Date: 2024-11-22

Patch Changes

  • @react-router/dev - Ensure typegen file watcher is cleaned up when Vite dev server restarts (#12331)
  • @react-router/dev - Pass route error to ErrorBoundary as a prop (#12338)

Full Changelog: v7.0.0...v7.0.1

Originalquelle(öffnet in neuem Tab)Problem melden

React Router von Remix

Remix: React Router v7.0.0

Große Umstrukturierung: Mehrere Pakete werden in react-router zusammengeführt, veraltete APIs wie json und defer werden entfernt, und Laufzeitadapter exportieren keine gemeinsamen APIs mehr.

Date: 2024-11-21

Breaking Changes

Package Restructuring

  • The react-router-dom, @remix-run/react, @remix-run/server-runtime, and @remix-run/router have been collapsed into the react-router package
    • To ease migration, react-router-dom is still published in v7 as a re-export of everything from react-router
  • The @remix-run/cloudflare-pages and @remix-run/cloudflare-workers have been collapsed into @react-router/cloudflare package`
  • The react-router-dom-v5-compat and react-router-native packages are removed starting with v7

Removed Adapter Re-exports

Remix v2 used to re-export all common @remix-run/server-runtime APIs through the various runtime packages (node, cloudflare, deno) so that you wouldn't need an additional @remix-run/server-runtime dependency in your package.json. With the collapsing of packages into react-router, these common APIs are now no longer re-exported through the runtime adapters. You should import all common APIs from react-router, and only import runtime-specific APIs from the runtime packages:

// Runtime-specific APIs
import { createFileSessionStorage } from "@react-router/node";
// Runtime-agnostic APIs
import { redirect, useLoaderData } from "react-router";

Removed APIs

The following APIs have been removed in React Router v7:

  • json
  • defer
  • unstable_composeUploadHandlers
  • unstable_createMemoryUploadHandler
  • unstable_parseMultipartFormData …

Originalquelle(öffnet in neuem Tab)Problem melden