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
national-goldOP•17mo 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 thisunwilling-turquoise•17mo 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