T
TanStack10mo ago
extended-salmon

Updating tanstack router version ^1.75.0 to ^1.82.1

I updated tanstack router and now useSearch returns an 'any' type.
4 Replies
extended-salmon
extended-salmonOP10mo ago
Andre de Waard
StackBlitz
Router Start Basic Example (forked) - StackBlitz
Run official live example code for Router Start Basic, created by Tanstack on StackBlitz
extended-salmon
extended-salmonOP10mo ago
inside the routes/index.tsx file you can see the type of search is any I see some changes in the docs that tanstack started to use @tanstack/zod-adapter instead of @tanstack/router-zod-adapter but still get the any Hm that started to be working. could i find this changes somewhere in the releases? because i cant find this change anywhere except from reading the docs again.
ambitious-aqua
ambitious-aqua10mo ago
I ran into this same thing yesterday. Just had to swap @tanstack/router-zod-adapter for @tanstack/zod-adapter and use zodValidator() instead of zodSearchValidator(). I agree that this should have been mentioned somewhere in the release notes on https://github.com/TanStack/router/releases
GitHub
Releases · TanStack/router
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router

Did you find this page helpful?