-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: move @tanstack/react-query to peerDependencies for fix react-query context error #697
Conversation
🦋 Changeset detectedLatest commit: 3e4fa79 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #697 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 651 651
Lines 17769 17769
Branches 1113 1113
=========================================
Hits 17769 17769 ☔ View full report in Codecov by Sentry. |
同理 |
嗯,viem 也应该用户自己安装,文档里面加上了。另外我们的仓库里面直接依赖 wagmi 就行,我把 viem 的依赖去掉了。 |
[中文版模板 / Chinese template]
📝 Git Commit Message Convention
@tanstack/react-query 和 wagmi 一样应该是 peerDependencies,wagmi 中 peerDependencies 依赖了 @tanstack/react-query,wagmi 是 peerDependencies,@tanstack/react-query 应该也是 peerDependencies。不然构建工具打包的时候可能会重复构建多次 @tanstack/react-query,导致 context 不对。
issue 中出现的问题就是因为虽然在
@ant-design/web3-wagmi
中我们初始化并提供了 queryClient,但是在 wagmi 中使用的 react-query context 和@ant-design/web3-wagmi
中的并不是同一个,所以会报没有初始化 queryClient。🔗 Related issue link
close #501