How to use query within button callback #8320
-
Assume I have a form, and on button click I want to publish the data via a post method, wait for it to finish and trhen e.g. show a notification with the outcome? How do I do that? (I have seen the API google brings up was deprecated with https://tkdodo.eu/blog/breaking-react-querys-api-on-purpose, but not clear how to do it in v5) my use case. |
Beta Was this translation helpful? Give feedback.
Answered by
gaborbernat
Nov 20, 2024
Replies: 1 comment
-
https://tanstack.com/query/latest/docs/framework/react/reference/useMutation |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gaborbernat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://tanstack.com/query/latest/docs/framework/react/reference/useMutation