Skip to content
Discussion options

You must be logged in to vote

That is exactly what refetchOnMount is for :). It refetches queries in the background when this observer mounts IF the query is stale. By invalidating it, it is set to stale, so it will be refetched.

The question is more: why did you turn off that flag in the first place? I'm guessing it's because you got too many background refetches, to which the probably better solution would be to set a higher staleTime.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@kostia1st
Comment options

@TkDodo
Comment options

@kostia1st
Comment options

@TkDodo
Comment options

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