how to navigate to dynamic route using hard-coded path?
This is the route
blogs/$id
and I wanna navigate to /blogs/1
when I did this navigate({ to: '/blogs/1',});
I get error
6 Replies
absent-sapphireā¢8mo ago
navigate({ to: '/blogs/$id', params: { id: 1 } })
graceful-beigeOPā¢8mo ago
Okay that work.
Also how do I deal with this
"/blogs/$id?tag=$tag"
it could have query param. I did not find in the doc how to construct for optional query param.
š getting error
Also how to force rebuilt routeTree.gen.ts
sometimes I get error there and either I have to delete the file or I have to manually edit (which is forbidden), in case it generates wrong file for my mistake.absent-sapphireā¢8mo ago
Search Params | TanStack Router React Docs
Similar to how TanStack Query made handling server-state in your React applications a breeze, TanStack Router aims to unlock the power of URL search params in your applications. Why not just use URLSe...
absent-sapphireā¢8mo ago
you need a validateSearch function for your route i believe
graceful-beigeOPā¢8mo ago
Never mind Claude gave me right answer I should only provide
search
object.absent-sapphireā¢8mo ago
not if you also need params