Patch Changes
-
#8390
b747fb8- 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. -
#8324
6387d58- Reuse hydration snapshot getters to avoid unnecessary store-instance effect updates when Links and other hydration-aware components rerender. -
#8318
9b2adaf- Allow active and inactive Link props to override base element props in React and Solid while preserving class/style merging. Keep React'shref,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. -
#8327
634da91- MakepathParamsAllowedCharactersinitialization-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. -
#8370
e9396c9- Stop exporting the internalisPlainObjectandisPlainArrayhelpers. -
#8324
6387d58- Avoid a redundant prop copy when rendering native Links while preserving custom-component props and the public hook result. -
#8252
7e349c3- 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. -
#8370
e9396c9- 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. -
Updated dependencies [
d76a332,b747fb8,6cfb1e8,700a714,700a714,8fff7fa,f021f6d,ae68535,7e349c3,873c830,7e349c3,634da91,e9396c9,634da91,f151ab0,bc57fa3,9872d2a,d76a332,634da91,634da91,7e349c3,9448caa,e9396c9,700a714,634da91,634da91]:- @tanstack/router-core@1.171.30
- @tanstack/history@1.162.4