We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
navigate()
to
Router
When using string templates + string unions, the to prop of navigate() will widen the type of the value to string instead of using the narrowed type.
string
https://stackblitz.com/edit/github-nymikapi?file=src%2Fmain.tsx
from
as const
navigate() should work like linkOptions()
linkOptions()
No response
Previously related issue: #3029
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which project does this relate to?
Router
Describe the bug
When using string templates + string unions, the
to
prop ofnavigate()
will widen the type of the value tostring
instead of using the narrowed type.Your Example Website or App
https://stackblitz.com/edit/github-nymikapi?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
navigate()
types can catch issues withfrom
with or withoutas const
, and issues withto
withas const
.navigate()
types fail to catch issues withto
withoutas const
Expected behavior
navigate()
should work likelinkOptions()
Screenshots or Videos
No response
Platform
Additional context
Previously related issue: #3029
The text was updated successfully, but these errors were encountered: