@tanstack/react-router
1.170.46 · 22 Oct 2026MIT29.2M / weekRepositoryHomepagenpmAtom feed
1.170.46 is the newest release of 1.x.
In short
1 breaking1 removed5 faster1 fixed3 internal
- Breaking
Make
pathParamsAllowedCharactersinitialization-only. Configure it when creating the router; changing allowed characters requires a new router instance. Remove decoder-update bookkeeping and decoder-change checks from route-owned path caches. - Removed
Stop exporting the internal
isPlainObjectandisPlainArrayhelpers.
Release note
Patch Changes
Keep the Link location cache out of server bundles:
buildLocationonly creates, reads and writes it whenisServeris false. Render React Links on the server without the extra prop copies and the forwarded-ref hook. Link SSR rendering is 20-40% faster in the Link benchmarks and the React Start SSR request loop about 7% faster.React
activePropsandinactivePropsnow follow one precedence rule on every link, including links whose destination is blocked for using a disallowed scheme: state props override element props,refand event handlers, whilehref,disabledandtargetstay controlled by the router. Previously a blocked link ignored arefor handler from its inactive props.React
LinkanduseLinkPropssplit router options from element props with one key set on the client and the server. Element props pass through as given: external links forward them verbatim, falsy values included, anduseLinkPropsnow returnschildrenfor router-controlled links as it already did for external ones.Reuse hydration snapshot getters to avoid unnecessary store-instance effect updates when Links and other hydration-aware components rerender.
Allow active and inactive Link props to override base element props in React and Solid while preserving class/style merging. Keep React's
href,target, anddisabledvalues controlled by routing options. Preserve Vue object and nested-array class bindings, including reactive updates and server rendering, without mutating cached bindings during VNode normalization.Make
pathParamsAllowedCharactersinitialization-only. Configure it when creating the router; changing allowed characters requires a new router instance. Remove decoder-update bookkeeping and decoder-change checks from route-owned path caches.Stop exporting the internal
isPlainObjectandisPlainArrayhelpers.Avoid a redundant prop copy when rendering native Links while preserving custom-component props and the public hook result.
Reduce the bundle cost of shared Link pathname interpolation while preserving its rendering performance. Reuse one interpolation pass for pathname and optional metadata, keep the bounded cache on the router, and simplify React Link active-state and prop merging.
Reuse built locations for Links whose destination does not depend on the current location.
buildLocationkeeps the result per options object when the build never read the current location, and the ReactLinkpasses one stable options object per instance, so navigations resolve unchanged Links with a lookup instead of a full build. The per-route pathname interpolation cache this replaces is removed. Linkparams,searchandactiveOptionsare compared by value on render, so inline object literals with unchanged contents keep reusing the Link's location. Pass a new object to change a destination; like any other React prop, an object mutated in place is not re-read.
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.