type broken on useServerFn?
Sorry for the AI generated summary, but just wanted a clean reproducible version of the issue:
7 Replies
national-goldOP•2mo ago
Do we have to do this?
const serverFn = useServerFn(signin$); always?funny-blue•2mo ago
weird inference issue :ThinkSpin:
what's the problem with that though ?
national-goldOP•2mo ago
nothing, just following some blog https://www.brenelz.com/posts/using-server-functions-and-tanstack-query/
Using Server Functions and Tanstack Query
A website containing blog posts related to the frontend.
national-goldOP•2mo ago
and wanted to confirm if this is a bug, if it's by design I think we should add it in the docs that we will loose the type inference otherwise, dont you think so?
All dependencies are latest
like-gold•2mo ago
can you please create a github issue for this?
even if this cannot be solved eventually (due to how type inference works) it's still helpful for documentation purposes
national-goldOP•2mo ago
Sure, I'll create a demo and if someone confirm it's how it works by design I can create a MR to add it to the docs. Thanks @Manuel Schiller
national-goldOP•2mo ago
Raised a bug just to get some feedback, maybe Im doing something wrong https://github.com/TanStack/router/issues/5352
GitHub
Broken type for useServerFn · Issue #5352 · TanStack/router
Which project does this relate to? Router Describe the bug Hi, I think the type is broken for the useServerFn. I've reproduced and noticed that if I need to use the onSuccess callback I loose t...