How to retry failed request with the same query keys #2702
Unanswered
donysukardi
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I usually call |
Beta Was this translation helpful? Give feedback.
2 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.
-
Suppose we have a setup like the following, with SearchForm and SearchResults components that operates on searchParams state.
With such setup, when useQuery fails and user presses Submit button again, the useQuery won't rerun since the
searchParams
is deep equal with the previous value.Is there any recommended pattern to solve this?
I can think of one solution, which is to compare new
searchParams
with existing one and if it's deep equal, I invalidate existing query instead.Beta Was this translation helpful? Give feedback.
All reactions