Refetch mutation after user action.
Hi !
I have a useMutation to get datas and display it on a Table.
I would like to refetch my datas without havin to refresh de page.
but i don't understand how can i use my queryClient to trigger the refetch.
on my table action i tried that:
thank you
7 Replies
rival-black•2y ago
Read the documentation please
exotic-emeraldOP•2y ago
I did it that's why i'm here now, don't be rude, if you know what i did wrong tell me so i don't make the same error again.
Maybe i didn't understood the doc in the right way
rival-black•2y ago
Why are you using useMutation and not useQuery??
exotic-emeraldOP•2y ago
because i saw in the documentation that we should use (as i understood) useMutation we we want to do something with the data after the request is executed
rival-black•2y ago
Oh boy. I recall the first response: read the docs
automatic-azure•2y ago
Use
useQuery
and you will find refetch
to use itexotic-emeraldOP•2y ago
well thanks