Packages

react-router

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

Your version

8.2.0

8 Jul 2026Where it was published

8.5.2 is the newest release of 8.x.

In short

5 fixed

Security

1 advisory affects 8.2.0; 8.3.0 fixes them

Release note

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

Patch Changes

  • Fix href() to properly stringify and URL-encode param values, matching generatePath()

    • splat params preserve path separators while encoding each segment individually

  • Fix dynamic param extraction for routes with optional static segments

    • When a route path contains optional static segments (e.g. /school?/user/:id), the internal regex's incorrectly shifted parameter indices resulting in incorrect parameter extraction

    • Consecutive optional static segments (e.g. /one?/two?) were only partially handled

  • Preserve navigation blocker state through a revalidation

  • Fix route ranking for dynamic parameters with static extension suffixes

    • These were not being detected as dynamic param segments and instead got incorrectly scored higher as a static segment

    • This meant they could potentially tie truly static routes like /sitemap.xml and outrank them based on definition order

    • These are now correctly identified as dynamic parameter segments and scored correctly

  • Use ReactFormState types instead of unknown

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.