Closed cyb456 closed 1 month ago
Is this a regression @cyb456 ?
Is this a regression @cyb456 ?
It used to work no problem at least on 1.53.1 and previous, I do not know when it started happening after that version
With the new custom link guide in the docs, I'm closing this in favor using the official guide. https://tanstack.com/router/latest/docs/framework/react/guide/custom-link
@SeanCassiere Thanks, it's good to have this documented. Curious, is there a reason that it's no longer possible to simply do <Button component={Link} ... />
like it was in 1.53.1 and prior?
@tobyzerner this due to the number of generics the TSR Link component requires. MUI doesn't correctly handles these types correctly by default. Not to mention, our types aren't static. They can easily change between releases, since we only guarantee runtime functionality between versions, not the types.
Which project does this relate to?
Router
Describe the bug
I updated my project dependencies and encountered this typescript error on typography components that used tanstack router links
Your Example Website or App
https://stackblitz.com/edit/github-pzkexk?file=src%2Froutes%2F__root.tsx
Steps to Reproduce the Bug or Issue
install MUI and tanstack router use a Link as the component for a typography component have a parameter present this can be seen in the stackblitz link for the about page from inside the __root.tsx
Expected behavior
No typescript error
Screenshots or Videos
No response
Platform
Additional context
relevant dependency update was @tanstack/react-router 1.53.1 to @tanstack/react-router 1.57.15 @mui/material 6.0.2 to @mui/material 6.1.0