Share data between multiple RQ Clients in one page #3472
-
Hello. I am building a react library that will be bundled and can be used as a library (widget) on a page. Let's imagine a weather widget. The widget can be included in multiple places on the page. Does RQ share data between multiple widgets? e.g. Widget #1 already fetched data, will RQ Client in widget #2 reuse that fetched data or vice-versa? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
If both widgets are rendered as a child of the same QueryClientProvider they will share the same QueryCache |
Beta Was this translation helpful? Give feedback.
-
Would the
|
Beta Was this translation helpful? Give feedback.
Would the
contextSharing
prop onQueryClientProvider
do what you want? Docs