Packages

react-router

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

Your version

7.9.5

29 Oct 2025Where it was published

7.18.6 is the newest release of 7.x.

In short

1 new3 fixed

Security

13 advisories affect 7.9.5; 7.18.0 fixes them

8 more

Release note

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

Patch Changes

  • Move RSCHydratedRouter and utils to /dom export.

  • useRoute: Return type-safe handle

    For example:

    // app/routes/admin.tsx
    const handle = { hello: "world" };
    // app/routes/some-other-route.tsx
    export default function Component() {
      const admin = useRoute("routes/admin");
      if (!admin) throw new Error("Not nested within 'routes/admin'");
      console.log(admin.handle);
      //                ^? { hello: string }
    }
  • Ensure action handlers run for routes with middleware even if no loader is present

  • Add unstable_instrumentations API to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches

    • Framework Mode:

      • entry.server.tsx: export const unstable_instrumentations = [...]

      • entry.client.tsx: <HydratedRouter unstable_instrumentations={[...]} />

    • Data Mode

      • createBrowserRouter(routes, { unstable_instrumentations: [...] })

    This also adds a new unstable_pattern parameter to loaders/actions/middleware which contains the un-interpolated route pattern (i.e., /blog/:slug) which is useful for aggregating performance metrics by route

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.