Redirect to throws type error on dynamic route
I have a dynamic route setup and the types keep throwing me errors even tho the route is clearly there.
The "to" keeps yelling at me that it is not a valid route, even tho I have "$sourceExternalName.$exportId.tsx" in my routes/file. Any idea why this could be?
1 Reply
yappiest-sapphire•8mo ago
in tanstack/router, you shouldn't do the interpolation yourself. Your redirection should probably be something like
The
to
string should match a known route from the router, and this is how type-safety is handled