Replies: 1 comment
-
query keys are used as keys for the query cache, if you change it, you would create a new cache entry. You can likely just useQuery with the new query Key and copy over data from the old one with the initialData function. |
Beta Was this translation helpful? Give feedback.
0 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.
-
Can I edit queryKeys after fetch data.
i.e:
queryKeys=[nickName, slug]
. Suppose slug is unique, so I will fetch blog detail by slug -> data return (blog detail and author nick name)queryKeys = ['tienlx12345', 'fake-slug-f051e385e87e']
. But real nickName after fetch is tienlx97 -> I want change queryKeys to['tienlx97', 'fake-slug-f051e385e87e']
.How can I do that ?
Beta Was this translation helpful? Give feedback.
All reactions