How to manage the query key correctly #2067
Unanswered
tianleiyiji123
asked this question in
Q&A
Replies: 1 comment 6 replies
-
I usually manage the keys in global client state, or in router state, like:
if I switch to a different todo, I update the url:
and all subscribers will re-render and re-fetch (if you use something like react-router). so the url is a good global state manager for these kinds of things |
Beta Was this translation helpful? Give feedback.
6 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.
-
How to effectively and reasonably manage the key field in each query? When creating a query, the query may change according to the parameters, and then when you want to use the query again on another page, the key cannot be clearly known
Beta Was this translation helpful? Give feedback.
All reactions