sharing queryclient between packages #3976
Unanswered
Itaysade98
asked this question in
Q&A
Replies: 1 comment
-
Have you tried monorepo? eg: https://pnpm.io/workspaces |
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.
-
lets say i'm working on react project A that utilizes components and hooks from package B that i developed. these components and hooks request data from an API, and i wanted to use useQuery to handle these requests - so i wrapped the main component in project A with a QueryClientProvider but i get an error that there is no queryclient set even though the components and hooks that use useQuery are called inside the provider. i've looked for similar problems and had no success, tried to configure react-query as a peer-dependency in package B, made sure it wasn't version differences between A and B and enabled contextSharing in the provider. if anyone has a suggestion i'd love to try.
Beta Was this translation helpful? Give feedback.
All reactions