github TanStack/router @tanstack/react-router@1.171.0

Minor Changes

  • #9081 53169f5 - Add the typed structuralSharing option and ValidateSelected support to useRouteContext (including Route.useRouteContext, RootRoute.useRouteContext, RouteApi.useRouteContext, and LazyRoute.useRouteContext) in @tanstack/react-router, matching useMatch, useSearch, useParams, useLoaderData, and useLoaderDeps.

    Also re-export the ResolveUseRouteContext helper type from @tanstack/router-core.

    Note for apps with defaultStructuralSharing: true: TypeScript now validates useRouteContext select return types with ValidateSelected, matching the other React hooks. Call sites whose select returns a function or an object with methods (such as QueryClient or an auth client) must pass structuralSharing: false to opt out (previously structuralSharing was not accepted on useRouteContext).

Patch Changes

  • #9011 75f1d84 - Fix export 'use' was not found in 'react' errors in React 18 production builds with Rspack and webpack.

  • #9031 7d3d3ca - Remove the preloadIntentProximity link option and the defaultPreloadIntentProximity router option, which were never implemented.

  • Updated dependencies [53169f5, 7d3d3ca]:

    • @tanstack/router-core@1.172.0

Don't miss a new router release

NewReleases is sending notifications on new releases.