Skip to content

Setting Cached Time Base on a function instead of based on a period #7113

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

You must be logged in to vote

yes, that's pretty much what I said. It's not supported.

How can I slove this

put staleTime and gcTime values in react state and update that state when you get a response

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@talpx0
Comment options

@TkDodo
Comment options

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