Replies: 3 comments 3 replies
-
I think you can re-export the Provider from your component library and the consumers can just use that or do they don’t need to depend on react-query themselves. i think it would also work if you wrap each component with it’s own provider - but they wouldn’t share a cache then... |
Beta Was this translation helpful? Give feedback.
-
I tried using the provider for each of the component. But I get the below error when testing the component using StoryBook.
Any example would be helpful. |
Beta Was this translation helpful? Give feedback.
-
I am also facing a similar issue, is there some workaround or solution? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create multiple reusable components involving multiple remote queries, so that projects that use this component does not have to worry about dealing with data fetching.
It was all working fine in v2. But for a new component library that I am working I am using v3 and struck now. I understand that v3 now requires
QueryCientProvider
at the top of the React tree.Since mine is a atom level component, how should I be doing this? Should I include
QueryCientProvider
for each smaller component?I do not like the idea of making other teams/projects to include
QueryCientProvider
in their tree.Beta Was this translation helpful? Give feedback.
All reactions