chore: sync feature into next

This commit is contained in:
thinkasany
2025-09-06 14:47:29 +08:00
21 changed files with 174 additions and 53 deletions

View File

@@ -6,15 +6,15 @@ tag: New
<!-- prettier-ignore -->
:::info{title="Compatibility Interface"}
antd v5 compatibility with React 16 ~ 18 by default. For React 19, you can use the following compatibility methods to adapt.
:::
antd v5 is compatible with React 16 ~ 18 by default, and most features are also compatible with React 19. A few issues are listed below, and the following compatibility methods can be used for adaptation. This method and interface will be removed in v6.
::::
### React 19 Compatibility Issues
Since React 19 adjusted the export method of `react-dom`, antd cannot directly use the `ReactDOM.render` method. Therefore, using antd will encounter the following problems:
Due to React 19 adjusting the export method of `react-dom`, antd cannot directly use the `ReactDOM.render` method. Therefore, using antd will encounter the following issues:
- Wave effect does not show
- Static methods of `Modal`, `Notification`, `Message` not working
- Wave effect does not work properly
- `Modal``Notification``Message` and other components' static methods are invalid (hooks invocation methods are not affected).
Therefore, you need to use a compatibility configuration to make antd work properly in React 19.

View File

@@ -6,7 +6,7 @@ tag: New
<!-- prettier-ignore -->
:::info{title="兼容接口"}
antd v5 默认兼容 React 16 ~ 18 版本,于 React 19 版本,可使用以下兼容方法进行适配。该兼容方式以及接口将在 v6 被移除。
antd v5 默认兼容 React 16 ~ 18 版本,绝大多数功能也兼容于 React 19 版本。少数问题如下所示,可使用以下兼容方法进行适配。该方式以及接口将在 v6 被移除。
:::
### React 19 兼容问题
@@ -14,7 +14,7 @@ antd v5 默认兼容 React 16 ~ 18 版本,对于 React 19 版本,可以使
由于 React 19 调整了 `react-dom` 的导出方式,导致 antd 无法直接使用 `ReactDOM.render` 方法。因而使用 antd 会遇到以下问题:
- 波纹特效无法正常工作
- `Modal``Notification``Message` 等组件的静态方法无效
- `Modal``Notification``Message` 等组件的静态方法无效hooks 调用方式不受影响)
因而需要通过兼容配置,使 antd 在 React 19 中正常工作。