File upload, hide upload dialogue after mutation

As you can see, I'm trying to convert a file into base64, then send it to the backend as a mutation, then after a backend operation on the file, I want to hide the dialogue. Usually here I would use .then , but it appears I cannot here.
5 Replies
Max
MaxOP•3y ago
( ignore second "hideStateSetter(false)" )
Neto
Neto•3y ago
mutate isnt a async operation mutateAsync is
Max
MaxOP•3y ago
my days im stoopid Thanks 🙂 Out of intrest, when would anyone use mutate?
Neto
Neto•3y ago
is more of a react query approach as you can use functions on the mutation result without using .then() or .catch()
Max
MaxOP•3y ago
aah cool, thanks!

Did you find this page helpful?