Sharing caches or sharing client? #4147
Unanswered
numbers1311407
asked this question in
Q&A
Replies: 1 comment
-
the client is just a vessel for the caches, which holds default configs. you can share either one. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it appropriate to share MutationCache and QueryCache between clients? Or if not, it is appropriate to share a client between apps?
The project I'm on is a client side micro frontend which mounts react packages separately, so they don't share a common QueryClientProvider.
I started down the path of sharing a single queryClient cross app, as that seemed to be the intention of query client context sharing, but realized the QC provider setup doesn't support this out of the box because the single client would be mounted/unmounted in the lifecycle of each provider.
This made me wonder if this sharing the caches was more appropriate, it seems like it may be but I thought I'd look for expert advice before continuing on either path.
Beta Was this translation helpful? Give feedback.
All reactions