unstale

npm / react-router-dom

react-router-dom

What changed in react-router-dom 7, from its official release notes, upgrade guides and advisories. Also covers @types/react-router-dom. Sources checked 2026-10-18.

6 breaking7 new APIs and options

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

react-router-dom 713 changes

Breaking changes 6

  • The React Router Cloudflare dev proxy is removed; Cloudflare projects should use @cloudflare/vite-plugin instead.

    7.0.0upgrade guide

  • Use loaderData instead of deprecated data fields in meta arguments, meta matches, and matches returned from useMatches().

    7.0.0upgrade guide

  • React Router v8 requires node@22.22+.

    7.0.0upgrade guide

  • React Router v8 requires react@19.2.7+ and react-dom@19.2.7+.

    7.0.0upgrade guide

  • The re-export package is removed; import DOM-specific APIs from react-router/dom and other APIs from react-router.

    7.0.0upgrade guide

  • Framework mode requires vite@7+ and the future.v8_viteEnvironmentApi flag.

    7.0.0upgrade guide

New APIs and options 7

  • Opt in to middleware that runs code before and after Response generation for a matched path.

    7.0.0upgrade guide

  • Pass the raw HTTP request to handlers instead of normalizing request.url; use the sibling url parameter for normalized routing logic.

    7.0.0upgrade guide

  • Opt in to splitting client-side route exports into independently loadable chunks, so they can run while the route component downloads.

    7.0.0upgrade guide

  • Preserve trailing-slash semantics in data request URLs using the /_.data format for trailing-slash routes; the root data request changes to /_.data.

    7.0.0upgrade guide

  • Enable support for Vite's experimental Environment API; custom configuration relying on isSsrBuild may need to move under per-environment configuration.

    7.0.0upgrade guide

  • A sibling handler parameter provides a URL instance representing the normalized location when request.url is passed through raw.

    7.0.0upgrade guide

  • The Architect adapter will use event.requestContext.domainName by default, falling back to the Host header; this option can opt in to that behavior on v7.

    7.0.0upgrade guide