mutateAsync vs mutate with options. What's the difference?
The docs on this page: https://tanstack.com/query/latest/docs/framework/react/guides/mutations#promises say "Use mutateAsync instead of mutate to get a promise which will resolve on success or throw on an error. This can for example be used to compose side effects." with the following code as an example:
But given that you can pass options to the mutate function, wont this code produce the same results?:
Is there any meaningful difference? Thanks!
But given that you can pass options to the mutate function, wont this code produce the same results?:
Is there any meaningful difference? Thanks!
