The Link prop 'to' not accepting the string type in 1.20.1 release. #1332
-
I decided to update my packages with @tanstack/react-router, and my linter displayed to me that the string type is not acceptable for the 'to' prop for Link components and navigate calls. I have the auth router logic from documentation. Right now, I see the same error in the code sandbox example. How can I define the type of redirect link to satisfy Typescript? |
Beta Was this translation helpful? Give feedback.
Answered by
schiller-manuel
Mar 19, 2024
Replies: 1 comment 2 replies
-
you can make the string strictly typed like this: https://stackblitz.com/edit/tanstack-router-8nkdck?file=src%2Froutes%2Flogin.tsx%3AL14 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to
as string should now work again as of https://github.com/TanStack/router/releases/tag/v1.20.4