T
TanStack12mo ago
sensitive-blue

getRouteApi().useParams() infers non-nullish value "{}" as type

When I access the route params via getRouteApi().useParams() the return value includes the correct params but also {} (twice). It works fine when using route.useParams() or useParams({ from: "/about/$name"). Did I something wrong? Repro: https://stackblitz.com/edit/tanstack-router-qc3zv7?file=src%2Fmain.tsx
Sandro
StackBlitz
tanstack-router-route-api-params - StackBlitz
Run official live example code for Router Quickstart, created by Tanstack on StackBlitz
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?