Replies: 5 comments
-
It's the same as the react version https://react-query.tanstack.com/reference/useMutation const addPost = useMutation((body) =>
axios.post('/api/posts', body)
);
addPost.mutate({ ... }) |
Beta Was this translation helpful? Give feedback.
-
@zynth17 As @wobsoriano mentioned most of the react-query docs apply. The API and options are exactly the same. |
Beta Was this translation helpful? Give feedback.
-
@wobsoriano @DamianOsipiuk thankyou for the explanation! 😁
you can try use unref? or wait for the new script setup ref release. anyway thankyou for the fast reply. much appreciate it. |
Beta Was this translation helpful? Give feedback.
-
I've added a paragraph about react-query docs to the readme. As for refs, yes it's kind of a pain currently. I think the best way would be to use the ref syntax sugar that is in the pipelines of vue - vuejs/rfcs#369 Also you can do something like |
Beta Was this translation helpful? Give feedback.
-
thankyou! |
Beta Was this translation helpful? Give feedback.
-
hello i really want to try this library, and i just reading the whole docs but i cannot find anything related to the mutation.
does mutation possible with this library?
or did i just miss the mutation section somewhere in the docs?
Beta Was this translation helpful? Give feedback.
All reactions