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
Max•2y ago
( ignore second "hideStateSetter(false)" )
Neto
Neto•2y ago
mutate isnt a async operation mutateAsync is
Max
Max•2y ago
my days im stoopid Thanks 🙂 Out of intrest, when would anyone use mutate?
Neto
Neto•2y ago
is more of a react query approach as you can use functions on the mutation result without using .then() or .catch()
Max
Max•2y ago
aah cool, thanks!
Want results from more Discord servers?
Add your server