Skip to content
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: useCallback for getNFTMetadata for avoid ‘Error: Maximum update depth exceeded’ #826

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

yutingzhao1991
Copy link
Collaborator

[中文版模板 / Chinese template]

💡 Background and solution

NFTCard 渲染的时候可能会出现 Error: Maximum update depth exceeded 这样的错误,原因是 getNFTMetadata 方法每次生成的引用都不同,导致 react 重复渲染

🔗 Related issue link

Copy link

changeset-bot bot commented Apr 25, 2024

🦋 Changeset detected

Latest commit: ec9acf4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@ant-design/web3-wagmi Patch
@ant-design/web3-ethers Patch
@example/ethers-v5 Patch
@example/ethers Patch

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

Copy link

vercel bot commented Apr 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ant-design-web3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 2:07am

Copy link

github-actions bot commented Apr 25, 2024

Preview is ready

@thinkasany thinkasany changed the title fix: useCallback for getNFTMetadata for avoid Error: Maximum update depth exceeded fix: useCallback for getNFTMetadata for avoid ‘Error: Maximum update depth exceeded’ Apr 25, 2024
@thinkasany
Copy link
Collaborator

调整了一下pr title, 反引号会显示不出来,之前有遇到过
image

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (5736ad9) to head (ec9acf4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #826   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files         707      707           
  Lines       21321    21325    +4     
  Branches     1195     1196    +1     
=======================================
+ Hits        21315    21319    +4     
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yutingzhao1991 yutingzhao1991 merged commit b9977a2 into main Apr 25, 2024
12 checks passed
@yutingzhao1991 yutingzhao1991 deleted the fix/reactcrash branch April 25, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants