Skip to content

refactor: Refactor Notification with pure hooks version#206

Merged
zombieJ merged 7 commits intomasterfrom
refactor
May 5, 2022
Merged

refactor: Refactor Notification with pure hooks version#206
zombieJ merged 7 commits intomasterfrom
refactor

Conversation

@zombieJ
Copy link
Copy Markdown
Member

@zombieJ zombieJ commented May 5, 2022

rc 层面不再提供 静态方法,静态方法由 antd 封装实现。

@vercel
Copy link
Copy Markdown

vercel bot commented May 5, 2022

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

Name Status Preview Updated
notification ✅ Ready (Inspect) Visit Preview May 5, 2022 at 7:45AM (UTC)

@codecov
Copy link
Copy Markdown

codecov bot commented May 5, 2022

Codecov Report

Merging #206 (c1f7821) into master (3c1dab4) will increase coverage by 1.24%.
The diff coverage is 100.00%.

❗ Current head c1f7821 differs from pull request most recent head 59e22b1. Consider uploading reports for the commit 59e22b1 to get more accurate results

@@             Coverage Diff             @@
##           master      #206      +/-   ##
===========================================
+ Coverage   98.75%   100.00%   +1.24%     
===========================================
  Files           3         3              
  Lines         161       117      -44     
  Branches       32        24       -8     
===========================================
- Hits          159       117      -42     
+ Misses          2         0       -2     
Impacted Files Coverage Δ
src/Notice.tsx 100.00% <100.00%> (+2.12%) ⬆️
src/Notifications.tsx 100.00% <100.00%> (ø)
src/useNotification.tsx 100.00% <100.00%> (ø)
src_bac/Notification.tsx

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@zombieJ zombieJ changed the title [WIP] refactor: Refactor Notification with pure hooks version refactor: Refactor Notification with pure hooks version May 5, 2022
@zombieJ zombieJ marked this pull request as ready for review May 5, 2022 07:47
@zombieJ zombieJ merged commit 2a2dd67 into master May 5, 2022
@delete-merged-branch delete-merged-branch bot deleted the refactor branch May 5, 2022 08:26
@dohooo
Copy link
Copy Markdown

dohooo commented Jul 5, 2022

rc 层面不再提供 静态方法,静态方法由 antd 封装实现。

Hi, 感谢你们为组件做的工作。

想请教为什么newInstance api被移除了,还有静态方法是指什么?

@zombieJ
Copy link
Copy Markdown
Member Author

zombieJ commented Jul 5, 2022

rc 层面不再提供 静态方法,静态方法由 antd 封装实现。

Hi, 感谢你们为组件做的工作。

想请教为什么newInstance api被移除了,还有静态方法是指什么?

newInstance 就是用于创建静态方法的,Notification.xxx 这种静态方法不能消费 context 同时其生命周期也和 App 本身的周期不一致。

@dohooo
Copy link
Copy Markdown

dohooo commented Jul 5, 2022

rc 层面不再提供 静态方法,静态方法由 antd 封装实现。

Hi, 感谢你们为组件做的工作。
想请教为什么newInstance api被移除了,还有静态方法是指什么?

newInstance 就是用于创建静态方法的,Notification.xxx 这种静态方法不能消费 context 同时其生命周期也和 App 本身的周期不一致。

是的!的确,我今天做的时候也在想你们是如何通过创建这样子的实例还能共用同一个context的,原来并没有做到。 看来的确走不通,感谢回复

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.

3 participants