Replies: 1 comment
-
#3636 should close this. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Currently, the only way to do optimistic updates is to use
queryClient.setQueeyData
with the query key, however, in some cases, I get access to the query itself in the same place that I want to do the optimistic update in.Basically what I'm asking for is an update function returned when
useQuery
is called, and this function may take an updater function or simply a new value.to use it:
instead of
Beta Was this translation helpful? Give feedback.
All reactions