Skip to content

How can I distinguish between fetching due to the query key or due to the stale time? #5306

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

You must be logged in to vote

You haven't mentioned that you are using keepPreviousData, so ...

isPreviousData is likely what you are looking for. This flag is set to true while you are seeing data from a previous query key.

Replies: 1 comment 4 replies

Comment options

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

@TkDodo
Comment options

@gandhis1
Comment options

@TkDodo
Comment options

Answer selected by gandhis1
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