How to refetch if queryKey is unchanged
hi everyone, i am trying to get the above code to work, but if the user submits the form again with the same value of "foo" i want to refetch. currently it only refetches when foo is changes between form submissions
2 Replies
sensitive-blueOP•2y ago
I know that I could do something like
however the reality is that foo is a complex object, so the
foo === nextFoo comparison would have to be a deep equality check and im hoping there is a different way to solve thiswise-white•2y ago
what if you introduce a version timestamp
into the query key
and increment it during submission
version would be another state
second argument in the query key