-
Notifications
You must be signed in to change notification settings - Fork 106
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(wagmi): solve react max update depth exceeded issue #884
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: ae84f79 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
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 |
感谢 @ONLY-yours 协助 debug |
点快了,ci好像有点问题需要再看看 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #884 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 708 708
Lines 21454 21461 +7
Branches 1214 1214
=========================================
+ Hits 21454 21461 +7 ☔ View full report in Codecov by Sentry. |
除了 |
好奇怪啊,只有在快速切换的时候能复现,正常切换没问题,难道是有些状态没卸载? |
bughd.mov我这边试的时候不用切换,正常连接也会有问题,重复试几次就会触发,而且是第一个连接下面的报错: |
ethersjs 和 web3js 页面还能复现这个问题吗 |
ethersjs 这个里面只有一个 demo,试了几次没有复现,web3js 这个两个 demo 来回试就出现了 ![]() 在 https://preview-884-ant-design-web3.surge.sh/components/ethereum-web3js 这里试的 |
最终定位到 |
这个 PR 对我们是有用的,但被 wagmi 关闭了,重新提了个 issue 给他们看看有没有新的进展:wevm/wagmi#3958 这个问题最终可复现路径为:使用了 |
Co-authored-by: kiner-tang <1127031143@qq.com>
* fix(wagmi): max update depth exceeded * chore(wagmi): add changeset * fix(wagmi): test case * test(wagmi): fix ci * test(wagmi): vitest cases * feat(ethersjs): support storage props * feat(web3js): support storage props * chore(web3): update demos for storage * chore: add changeset * test: add coverage * chore(wagmi): mock use disconnect * refactor(wagmi): use low-level disconnect instead * chore(wagmi): rm unused code Co-authored-by: kiner-tang <1127031143@qq.com> * docs: add storage config for ethereum adapters * chore(ethers): add storage for minor upgrade --------- Co-authored-by: kiner-tang <1127031143@qq.com>
修复经常在文档中遇到的 react rerender 次数过多导致的问题:
![image](https://private-user-images.githubusercontent.com/17971291/331141775-58ca06ef-e0ba-47a8-94c0-ec106b18d8e3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwMjYwNTcsIm5iZiI6MTcxOTAyNTc1NywicGF0aCI6Ii8xNzk3MTI5MS8zMzExNDE3NzUtNThjYTA2ZWYtZTBiYS00N2E4LTk0YzAtZWMxMDZiMThkOGUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIyVDAzMDkxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4OWM1ZTkzNDYwMDYxMzBmMGQ2Y2E4OTQyYzdlNmFhMDVlNDc5NjYxYzVlZGY2NDE0YzlmZjZhYzA0YzMyNTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YeOQq0zws4G9cdvWcSn6IxbeVUqKAczI7zB6UvQPm14)
web3-wagmi
包中有一处对 setState 的错误使用: