react-query - What's the difference between useQuery and useMutation hook?
Solution 1:
From Tanner Linsley:
The difference is the flow of data. useQuery is used to query async data, useMutation is used to mutate it. Or in the traditional CRUD speak:
Read: useQuery Create/Update/Delete: useMutation
https://twitter.com/tannerlinsley/status/1324384797939003393
Solution 2:
The best answer to this query which I found is : UseMutation: is used to create/update/delete data it's also used to re-fetch data. while UseQuery: is used to fetching data credit goes to:https://github.com/Avi98