Get initialData/server updates for useQuery with staletime: Infinity #7686
Unanswered
codinginflow
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this optimistic like button. In order to not have many like buttons refetch their state, I have set
staleTime
toInfinity
.The
initialState
is coming from the server-side fetch of the whole feed. This feed has revalidations enabled.Is there a way to update the like query whenever
initialState
changes? Should I useuseEffect
+setQueryData
?Beta Was this translation helpful? Give feedback.
All reactions