Deduplication issues #3358
-
Regarding this issue in StackOverflow https://stackoverflow.com/questions/68482832/using-react-query-in-external-package-leads-to-no-queryclient-set-error-even-t I also experienced the same issues and needed to run a npm dedup or yarn-deduplicate in order to solve it. Is there anything that react-query could do to solve this dependency issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
We use react context to retrieve the query client. If there are two versions of react query, each wants their own context instance, but you likely only provide one. |
Beta Was this translation helpful? Give feedback.
We use react context to retrieve the query client. If there are two versions of react query, each wants their own context instance, but you likely only provide one.
It depends on your setup, but if the lib that uses RQ has RQ as a peer-dependencies, it should not happen.