Replies: 1 comment 8 replies
-
Looks like those views don’t share the same QueryClientProvider. Do you give each view their own, and thus their own cache? |
Beta Was this translation helpful? Give feedback.
8 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.
-
Hey,
for a breadcrumb situation, I need to run the same query key like ['name', 100] in different views of the app. Ideally, I like to benefit from the cache, and for the next views other than the first useQuery, first load it instantly from cache and then based on my config trigger a fetch.
based on what I'm experiencing using the same key, seems like every time I visit the next view, it fetches it again without first loading it from the cache.
my code is like
View1: UseQuery(['name', id]....
View2: UseQuery(['name', id]....
for the same id, it blinks and fetches all the time.
Am I doing it with the right approach?
Beta Was this translation helpful? Give feedback.
All reactions