Invalidation is a whole other problem for sure. I usually have an invalidate hook that invalidates all queries within a certain domain i.e.
const invalidate = useInvalidateBasketQueries(); return useQuery(key, fn, { onSuccess: invalidate });
I've been using react query (and vue query) since day 1 and it's important we get some good/consistent patterns in place
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Invalidation is a whole other problem for sure. I usually have an invalidate hook that invalidates all queries within a certain domain i.e.
I've been using react query (and vue query) since day 1 and it's important we get some good/consistent patterns in place