Skip to content

Get time that last fetch occurred for query #1229

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

You must be logged in to vote

It seems to be not very well documented, but useQuery also returns an updatedAt: number field that holds exactly what you want I believe: https://github.com/tannerlinsley/react-query/blob/69236d3e0bce712376767a86eac9246b304f6be6/src/core/types.ts#L215

Replies: 2 comments 4 replies

Comment options

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

@bennettdams
Comment options

@TkDodo
Comment options

@bennettdams
Comment options

Answer selected by shekharsaxena
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants