Replies: 1 comment
-
If you add generics to
In your case, that would be at least:
however, I rarely needed to do that, as type inference works pretty well if your mutate function is statically typed as well. So I would try to remove the generic annotations and see how that works first. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following custom hook:
And use it as such:
I receive the following typescript error in my editor:
This error should not be thrown. Everything is typed correctly, so why is the mutate function parameters of type undefined?
Typescript reports the mutate function as this:
Any assistance would be greatly appreciated, this is a time sensitive issue.
Beta Was this translation helpful? Give feedback.
All reactions