-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(router-core): type mismatch for navigate function #4625
New issue
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
fix(router-core): type mismatch for navigate function #4625
Conversation
According to the docs this should only return a promise https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType#navigate-method Makes sense otherwise you cannot .then() it
View your CI Pipeline Execution ↗ for commit 58fb132
☁️ Nx Cloud last updated this comment at |
the errors are coming through since you are not handling the case where the if statements, within the handleClick handlers (both solid-router and react-router) ,are false and hence nothing is returned. with the updated type signature, void is no longer valid as a return for these handlers |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-with-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-plugin
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-plugin
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-server-functions-client
@tanstack/start-server-functions-fetcher
@tanstack/start-server-functions-server
@tanstack/start-storage-context
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
Thanks, should have spotted it. (in my defense I was preparing to leave work yesterday 😅 ) |
...bump in case this has slipped through? (sorry, not sure how long it usually takes to merge or comment on PRs) |
Apologies for the delay in responding. Should have some time to look at this more closely again. |
Thanks for this. it looks good |
Sorry, just got home; thank you, cheers! |
According to the docs this should only return a promise https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType#navigate-method
Makes sense otherwise you cannot .then() it