-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Describe the bug
Type of TContext in onError is not inferred from returned value of onMutate
To Reproduce
Steps to reproduce the behavior:
Go to https://codesandbox.io/s/gracious-newton-crlx9?file=/src/App.tsx
Expected behavior
TContext to be inferred from onMutate return value
React-Query
- Version: 3.5.11
Additional context
I'm not sure if there's something that I'm missing but the provided CodeSandbox should be almost the same as the one from documentation.. Optimistic Updates with Typescript. In React-Query's codesandbox it is inferred, in my code it's not.
Metadata
Metadata
Assignees
Labels
No labels