Skip to content
Discussion options

You must be logged in to vote

The important part is that you add the search parameters to the query key (all "dependencies" to the query should go to the query key!). Then, if the search input changes, react-query will automatically fire off a new request. The old request can finish later, and it will be put into the cache, but under a different cache key, which will make it not interfere with your currently displayed result.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by antti-neurali
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants