A new way to use createMutation
(at least with Svelte)?
#5384
Unanswered
frederikhors
asked this question in
Ideas
Replies: 1 comment
-
Hi Frederick :) I came across your code which actually helped me a lot (I'm coming from previous versions where it was called useMutation). I believe what you're trying to do is possible, however you do it in a slightly different way then you showed. To access the isLoading or isError that results from the mutation you do it like so:
Then if you want to show a loading modal or something while it's loading you can do: Same goes for error so if there's an error you can show the error message. Hope it helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use for the first time
@tanstack/svelte-query
today.The
query
part works good.What I find inconvenient is the use of
mutation
s with svelte.If you read the comments you can understand the annoying problem that makes using it very annoying right now.
Thank you for your work!
Beta Was this translation helpful? Give feedback.
All reactions