rerun onSuccess method of a cached query #4535
Replies: 1 comment
-
We might add a different callback
because So, it really depends on what that "operation" is. I don't see a good use-case for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What I have
I am getting the user's location (latitude/longitude) which I use to call a google geocode API, unless the user's coords change, the request is not running again, since the query it uses the user's coords as queryKey array dependecy.
The problem
the problem is that I'm running some operations in the
onSuccess
query method, this method is only run when any of the queryKey dependencies change, and I mentioned this not happen.How to run the
onSuccess
method whether the queryKey dependencies change or not?Reference code
@TkDodo
Beta Was this translation helpful? Give feedback.
All reactions