unstale

npm / @tanstack/react-router

@tanstack/react-router

What changed in @tanstack/react-router 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.

40 breaking2 security1 deprecations1 new APIs and options14 performance2 behavior and defaults1 tooling39 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.0 on npm

@tanstack/react-router 1100 changes

Breaking changes 40

  • Router requests whose Accept header allows neither text/html nor */* now receive 406 Not Acceptable instead of 500.

    1.170.37release notes

  • Active and inactive Link props override base element props, including refs and event handlers, while router-controlled href, disabled, and target values retain precedence.

    1.170.36release notes

  • The internal helper is no longer exported.

    1.170.36release notes

  • The internal helper is no longer exported.

    1.170.36release notes

  • React and Vue boundary error components and onCatch callbacks now type boundary errors as unknown; narrow errors before accessing message or stack.

    1.170.33release notes

  • Structural descendants below error and not-found boundaries are excluded from lifecycle callbacks, while lifecycle membership is preserved through invalidation, hydration, background reloads, and superseded navigation publication.

    1.170.33release notes

  • Removes the undocumented data-transitioning attribute from Link.

    1.170.26release notes

  • Removes the undocumented Link isTransitioning state.

    1.170.26release notes

  • The method now returns a tuple of matched routes, raw params, and the found route; preserving raw path params gives structured params stable match IDs and prevents stale loader data reuse.

    1.170.21release notes

  • RouteMatch.fetchCount has been removed with no replacement; it was purely informational.

    1.170.19release notes

  • The standalone @tanstack/router-core export has been removed; use the router.getMatchedRoutes() instance method instead.

    1.170.19release notes

  • The exported type has been removed along with the method it typed.

    1.170.19release notes

  • Exported React, Solid, and Vue Match components now accept routeId instead of matchId.

    1.170.19release notes

  • Removed from MatchRoutesOpts.

    1.170.19release notes

  • Removed from MatchRoutesOpts.

    1.170.19release notes

  • The former globalNotFound field is renamed and privatized; use match.status === 'notFound' instead.

    1.170.19release notes

  • Removed; it was internal redirect bookkeeping.

    1.170.19release notes

  • The status union no longer includes 'redirected'; redirected matches are dropped from the match list instead of being rendered.

    1.170.19release notes

  • Removed with no replacement.

    1.170.19release notes

  • Removed, with no replacement for cancelling an individual in-flight match from outside the router.

    1.170.19release notes

  • Removed, with no replacement for cancelling in-flight matches from outside the router.

    1.170.19release notes

  • Removed; expired cache entries are now reconciled automatically as part of match commit.

    1.170.19release notes

  • Replaced by the internal _commitPromise field.

    1.170.19release notes

  • Removed; read matches from router.state.matches instead.

    1.170.19release notes

  • Removed with no replacement.

    1.170.19release notes

  • Removed; check router.state.matches for a match whose status is 'notFound'.

    1.170.19release notes

  • Removed with no replacement.

    1.170.19release notes

  • Removed with no replacement.

    1.170.19release notes

  • Removed with no replacement.

    1.170.19release notes

  • The optional second argument no longer accepts an array of component types; it now accepts 'errorComponent', 'notFoundComponent', or false for internal boundary loading. One-argument usage is unchanged.

    1.170.19release notes

  • Removed; use routesById.

    1.170.19release notes

  • Replaced by the internal _pendingLocation field.

    1.170.19release notes

  • Removed, with no replacement for mutating an individual in-flight match from outside the router.

    1.170.19release notes

  • Removed with no replacement.

    1.170.19release notes

  • RouterState no longer exposes loadedAt, isTransitioning, statusCode, or redirect; use match.updatedAt and router.state.status / router.state.isLoading where indicated, while server response status and redirect handling are internal.

    1.170.19release notes

  • The adapter contract now uses ids, byRoute, and getMatchStore() instead of matchesId, matchStores, and getRouteMatchStore(); separate loading/status/cache stores and their setters are removed, and application-facing state should be read from router.state.

    1.170.19release notes

  • The signature is now (fn, expected) => Promise<boolean> instead of (fn) => void; custom framework adapters implementing startTransition are affected.

    1.170.19release notes

  • StoreConfig.init has been removed.

    1.170.19release notes

  • The exported type has been removed along with the method it typed.

    1.170.19release notes

  • The script callback context now exposes only kind: 'script' and url; script format handling remains internal to manifest rendering.

    1.170.8release notes

Security 2

  • Destinations are validated, ambiguous relative URLs stay on the current origin, and configured origins must already be normalized.

    1.170.34release notes

  • Prerender requests and output paths are constrained.

    1.170.34release notes

Deprecations 1

  • Warns when an Outlet is rendered inside a pending, error, or not-found component.

    1.170.26release notes

New APIs and options 1

  • Configure allowed path parameter characters when creating the router; changing them requires a new router instance.

    1.170.36release notes

Performance 14

  • Pending link preload timers are canceled when navigation starts to avoid redundant preloading while the destination is loading.

    1.170.42release notes

  • Link href classification and active/inactive results are reused across location updates while live history href formatting is preserved.

    1.170.41release notes

  • Skips unused Link preload cleanup when preloading is disabled.

    1.170.40release notes

  • Links reuse built locations when destinations do not depend on the current location; params, search, and activeOptions are compared by value, so unchanged inline objects reuse the location.

    1.170.36release notes

  • Shared Link pathname interpolation reduces bundle cost while preserving rendering performance.

    1.170.36release notes

  • Link SSR rendering is 20–40% faster in benchmarks, and the React Start SSR request loop is about 7% faster.

    1.170.36release notes

  • Links without user-supplied event handlers avoid allocating event-handler arrays and wrapper functions.

    1.170.34release notes

  • React Links reduce bundle size and avoid temporary class-name arrays and unnecessary style copies.

    1.170.34release notes

  • Cancels pending preloads when links leave the viewport.

    1.170.26release notes

  • Link now bails out of re-renders when the resolved href and active state are unchanged.

    1.170.23release notes

  • Sharing structuralSharing selector logic reduces bundle size.

    1.170.16release notes

  • Navigations trigger fewer Match rerenders.

    1.170.16release notes

  • useMatch and derived hooks perform better when navigating away from the previous match.

    1.170.16release notes

  • During SSR, useMatches can skip useRef for structural sharing.

    1.170.16release notes

Behavior and default changes 2

  • CatchBoundary is directly exported as a class component, removing the function wrapper.

    1.170.30release notes

  • Client entry scripts and preloads are now represented as root route manifest assets.

    1.170.8release notes

Tooling 1

  • Adds support for module output by default and IIFE output for classic script environments.

    1.170.8release notes

Fixes and other changes 39

  • Builds mask and routeMasks locations from the same _fromLocation as the destination.

    1.170.42release notes

  • Links for routes left by a pending navigation skip deriving the destination location, and clicks and preloads follow the href the Link displays.

    1.170.42release notes

  • Fixed Link destinations resolving to a route mask are reused across navigations; mounted Links follow changes to href and reloadDocument props.

    1.170.42release notes

  • Only enabled route boundaries are composed, rather than rendering inactive wrapper components.

    1.170.41release notes

  • Ignores queued viewport notifications after their effect has been cleaned up.

    1.170.40release notes

  • Links that do not compare URL hashes no longer trigger hydration rerenders, while hash-sensitive active state and ClientOnly behavior are preserved.

    1.170.39release notes

  • Large deferred SSR hydration payloads stream through a backpressure-aware router transport; cancelled or expired transforms close safely.

    1.170.37release notes

  • Element props pass through as given for external links, including falsy values; useLinkProps also returns children for router-controlled links.

    1.170.36release notes

  • Blocked-link inactive props remain consistent during React hydration.

    1.170.34release notes

  • Native form HTTP redirects, route error handling, and masks are preserved for document redirects.

    1.170.34release notes

  • Explicit redirect Location headers are honored before route options are checked.

    1.170.34release notes

  • Redirect headers no longer appear in serialized server function response bodies.

    1.170.34release notes

  • Shared loader redirects retain per-navigation destinations.

    1.170.34release notes

  • React and Vue error boundaries preserve falsy thrown values; SSR wraps non-Error loader errors and retains the original value in cause.

    1.170.33release notes

  • React no longer repeats innerHTML writes for unchanged styles and data scripts during re-renders, avoiding unnecessary CSS parsing and Trusted Types errors during client navigation.

    1.170.33release notes

  • Successful not-found matches remain terminal shared boundaries during client navigation, preserving route context while the destination loads.

    1.170.33release notes

  • The route-scoped API now forwards shouldThrow and preserves optional return types when shouldThrow is false.

    1.170.33release notes

  • The route-scoped API now forwards shouldThrow and preserves optional return types when shouldThrow is false.

    1.170.33release notes

  • The route-scoped API now forwards shouldThrow and preserves optional return types when shouldThrow is false.

    1.170.33release notes

  • Context is preserved during reloads.

    1.170.32release notes

  • Pending UI is preserved across retained routes.

    1.170.30release notes

  • Resolved lazy route components are reused when revisiting code-split routes, preventing unnecessary pending UI.

    1.170.28release notes

  • Root components that may render the HTML document are no longer wrapped in a Suspense boundary during SSR and hydration.

    1.170.28release notes

  • Updated useMatchRoute for use with React Compiler.

    1.170.27release notes

  • Applies preloadDelay to viewport link preloading.

    1.170.26release notes

  • Mounted UI is retained during revalidation.

    1.170.22release notes

  • A component-scoped React transition for match publication prevents a blank frame before zero-delay initial pending UI.

    1.170.21release notes

  • Intersection observer options in the link component are cleaned up.

    1.170.21release notes

  • The documented default is now 5 minutes (300_000), matching the existing runtime default.

    1.170.19release notes

  • Route headers() now runs only on the server and is no longer invoked during client-side asset projection.

    1.170.19release notes

  • Invalidation now retires matching active preloads so older speculative loader results cannot become fresh cache data afterward.

    1.170.19release notes

  • Match loading now tracks navigations, preloads, and background reloads as ordered work, preventing state leakage between overlapping navigations, restoring correct SSR response statuses, and avoiding rerunning server-completed work during hydration.

    1.170.19release notes

  • The documented default is now 5 minutes (300_000), matching the existing runtime default.

    1.170.19release notes

  • AbortError is silenced during renderRouterToStream because it is normal operation.

    1.170.16release notes

  • Search middleware composition no longer restores search params that a downstream stripSearchParams removed.

    1.170.13release notes

  • Preserves primitive values thrown from beforeLoad error handling.

    1.170.10release notes

  • Fixes streaming.

    1.170.9release notes

  • Script asset cross-origin configuration now uses the script key.

    1.170.8release notes

  • Fixes hash navigation being overridden by stale scroll restoration entries.

    1.170.6release notes