Skip to content

Issue with Invalidating Infinite Queries on Different Screens #6147

Answered by TkDodo
RDR96 asked this question in Q&A
Discussion options

You must be logged in to vote

invalidation does two things:

  • it refetches active queries
  • it marks inactive queries as "invalid", so that they will be refetched on the next "trigger".

so if you go back to the overview page, and that page mounts, there should be a refetch unless you've changed the default of the refetchOnMount flag.

if you want an immediate refetch of all matching queries, even the inactive ones, use queryClient.refetchQueries.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aldoBangun
Comment options

Answer selected by RDR96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #6144 on October 13, 2023 07:13.