Skip to content

Clear and refetch? #331

Answered by bdrazen
bdrazen asked this question in General
Apr 8, 2020 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Worked it out with:

queryCache.removeQueries(myQueryKey);
myQuery.refetch();

Would be nice though if useQuery() returned a clearCache function or maybe refetch() accepted a clearCache option.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by tannerlinsley
Comment options

You must be logged in to vote
3 replies
@Rinaldo
Comment options

@TkDodo
Comment options

@Rinaldo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants