custom hook for invalidating queries #7790
Unanswered
kodobrody
asked this question in
Show and tell
Replies: 1 comment
-
you might like: https://tkdodo.eu/blog/automatic-query-invalidation-after-mutations |
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
-
Since many of us only need simple query invalidation upon mutation success, error or settle and (at least for me) using useQueryClient with each mutation seems a bit cumbersome, I came up with simple useInvalidateQueryHook.
the usage is as following:
Beta Was this translation helpful? Give feedback.
All reactions