Skip to content

chore: remove unstable api for React 19 compitable#55274

Merged
li-jia-nan merged 10 commits intonextfrom
rm-unstableSetRender-v6
Oct 13, 2025
Merged

chore: remove unstable api for React 19 compitable#55274
li-jia-nan merged 10 commits intonextfrom
rm-unstableSetRender-v6

Conversation

@li-jia-nan
Copy link
Member

@li-jia-nan li-jia-nan commented Oct 11, 2025

Language Changelog
🇺🇸 English v6 本身支持 React 19,无需兼容
🇨🇳 Chinese v6 本身支持 React 19,无需兼容

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2025

Preview is ready

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2025

👁 Visual Regression Report for PR #55274 Passed ✅

🎯 Target branch: next (9fdba0a)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎

🎊 Congrats! No visual-regression diff found.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rm-unstableSetRender-v6

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @li-jia-nan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the rendering mechanism by removing a temporary, unstable API (unstableSetRender) that was introduced for React 19 compatibility. The changes reflect a move towards a more stable and integrated rendering solution, leveraging @rc-component/util/lib/React/render directly. This cleanup simplifies the codebase, removes deprecated interfaces, and ensures that components are using the recommended rendering approach for future React versions.

Highlights

  • Removal of unstableSetRender API: The unstableSetRender API, previously used for React 19 compatibility, has been completely removed. This includes its definition, exports, and all direct usages within the codebase.
  • Migration to @rc-component/util/lib/React/render: Components like WaveEffect, message, modal, and notification have been updated to directly utilize the render and unmount utilities from @rc-component/util/lib/React/render for their rendering needs, replacing the deprecated unstableSetRender.
  • Cleanup of related files: Associated test files (unstable.test.ts) and documentation (v5-for-19.en-US.md, v5-for-19.zh-CN.md) related to the unstableSetRender API and React 19 compatibility workarounds have been removed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly removes the deprecated unstableSetRender API, which was a temporary compatibility layer for React 19. The code is updated to use render and unmount from @rc-component/util directly, which simplifies the implementation. In components/modal/confirm.tsx, the local render function was also helpfully renamed to renderDialog to avoid shadowing the newly imported render function. The related tests, snapshots, and documentation have also been cleaned up accordingly.

I've found one critical issue in components/modal/confirm.tsx where the unmount function is called without the required container argument, which will cause an error. I've left a specific comment with a suggested fix. Besides that, the changes look good.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2025

size-limit report 📦

Path Size
dist/antd.min.js 497.03 KB (+111 B 🔺)
dist/antd-with-locales.min.js 589.65 KB (-352 B 🔽)

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 11, 2025

Deploying ant-design-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: a02f91c
Status: ✅  Deploy successful!
Preview URL: https://9d80626b.ant-design-next.pages.dev
Branch Preview URL: https://rm-unstablesetrender-v6.ant-design-next.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 11, 2025

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: a02f91c
Status: ✅  Deploy successful!
Preview URL: https://68c4060f.ant-design.pages.dev
Branch Preview URL: https://rm-unstablesetrender-v6.ant-design.pages.dev

View logs

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 11, 2025

@codecov
Copy link

codecov bot commented Oct 11, 2025

Bundle Report

Changes will decrease total bundle size by 2.56kB (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 11.82MB -2.56kB (-0.02%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.js -1.28kB 6.22MB -0.02%
antd.js -1.28kB 5.6MB -0.02%

@codecov
Copy link

codecov bot commented Oct 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d8d266b) to head (a02f91c).
⚠️ Report is 2 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #55274   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          798       797    -1     
  Lines        14771     14752   -19     
  Branches      3897      3896    -1     
=========================================
- Hits         14771     14752   -19     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@li-jia-nan
Copy link
Member Author

li-jia-nan commented Oct 12, 2025

官网挂了,需要等等这个:

zombieJ
zombieJ previously approved these changes Oct 13, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 13, 2025
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedclsx@​2.1.11001009678100
Addedthrottle-debounce@​5.0.210010010078100
Addedscroll-into-view-if-needed@​3.1.010010010078100
Addedadm-zip@​0.5.161001009778100
Addedreact@​19.2.01001008497100
Addedali-oss@​6.23.09810010085100
Addeddayjs@​1.11.1810010010086100
Addedantd-img-crop@​4.27.09910010089100
Addedreact-dom@​19.2.01001009297100

View full report

@li-jia-nan li-jia-nan requested a review from zombieJ October 13, 2025 14:23
@li-jia-nan li-jia-nan merged commit 01c0321 into next Oct 13, 2025
45 checks passed
@li-jia-nan li-jia-nan deleted the rm-unstableSetRender-v6 branch October 13, 2025 15:14
@zombieJ zombieJ mentioned this pull request Nov 4, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants