Packages

react-router

8.5.1 · 27 Oct 2026MIT80.5M / weekRepositorynpmAtom feed

Your version

7.5.0

4 Apr 2025Where it was published

7.18.6 is the newest release of 7.x.

In short

2 new

Security

14 advisories affect 7.5.0; 7.18.0 fixes them

9 more

Release note

The section about react-router of a note shared by several packages.

Minor Changes

  • Add granular object-based API for route.lazy to support lazy loading of individual route properties, for example:

    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,
        },
      },
    ]);

    Breaking change for route.unstable_lazyMiddleware consumers

    The route.unstable_lazyMiddleware property is no longer supported. If you want to lazily load middleware, you must use the new object-based route.lazy API with route.lazy.unstable_middleware, for example:

    createBrowserRouter([
      {
        path: "/show/:showId",
        lazy: {
          unstable_middleware: async () =>
            (await import("./show.middleware.js")).middleware,
          // etc.
        },
      },
    ]);

Patch Changes

  • Introduce unstable_subResourceIntegrity future flag that enables generation of an importmap with integrity for the scripts that will be loaded by the browser.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.