Repository navigation
@tanstack/react-router@1.171.0
Minor Changes
-
#9081
53169f5- Add the typedstructuralSharingoption andValidateSelectedsupport touseRouteContext(includingRoute.useRouteContext,RootRoute.useRouteContext,RouteApi.useRouteContext, andLazyRoute.useRouteContext) in@tanstack/react-router, matchinguseMatch,useSearch,useParams,useLoaderData, anduseLoaderDeps.Also re-export the
ResolveUseRouteContexthelper type from@tanstack/router-core.Note for apps with
defaultStructuralSharing: true: TypeScript now validatesuseRouteContextselectreturn types withValidateSelected, matching the other React hooks. Call sites whoseselectreturns a function or an object with methods (such asQueryClientor an auth client) must passstructuralSharing: falseto opt out (previouslystructuralSharingwas not accepted onuseRouteContext).
Patch Changes
-
#9011
75f1d84- Fixexport 'use' was not found in 'react'errors in React 18 production builds with Rspack and webpack. -
#9031
7d3d3ca- Remove thepreloadIntentProximitylink option and thedefaultPreloadIntentProximityrouter option, which were never implemented. -
Updated dependencies [
53169f5,7d3d3ca]:- @tanstack/router-core@1.172.0