Skip to content
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

Mutation Example #2

Open
khanzzirfaniag opened this issue Apr 13, 2023 · 2 comments
Open

Mutation Example #2

khanzzirfaniag opened this issue Apr 13, 2023 · 2 comments

Comments

@khanzzirfaniag
Copy link

How does mutation works in the hook?

@l0gicgate
Copy link
Contributor

It would work the exact same way as a .get. You can use .post or .put or .patch or .delete.

@khanzzirfaniag
Copy link
Author

Hello @l0gicgate , apologies for late reply.
the post/put/patch should return the useMutation and the MutateAsync, mutate, functions. Thats what i was expecting. Also on success, onError, function to run some side effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants