Skip to content

Commit

Permalink
Update components/app/index.zh-CN.md
Browse files Browse the repository at this point in the history
Co-authored-by: afc163 <afc163@gmail.com>
  • Loading branch information
MadCcc and afc163 committed Nov 30, 2022
1 parent ecf9950 commit a1eaf24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/app/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ demo:

## 何时使用

在 v5 版本中,我们推荐通过`hooks`顶层注册的方式代替 `message`,`modal`,`notification` 的静态方法,因为静态方法无法消费上下文,可以通过`App`组件包裹,获取`context`上下文.
- 提供可消费 React context 的 `message.xxx``Modal.xxx``notification.xxx` 的静态方法,可以简化 useMessage 等方法需要手动植入 `contextHolder` 的问题。
- 提供基于 `.ant-app` 的默认重置样式,解决原生元素没有 antd 规范样式的问题。

## 代码演示

Expand Down

0 comments on commit a1eaf24

Please sign in to comment.