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: Notification hooks #24337

Merged
merged 2 commits into from May 21, 2020
Merged

fix: Notification hooks #24337

merged 2 commits into from May 21, 2020

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented May 21, 2020

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Perfermance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

resolve #24334

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Adjust useNotification api instance to be same instance for each render.
🇨🇳 Chinese 调整 useNotification api 实例在每次渲染时都返回相同实例。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Could you please add tests to make sure this change works as expected?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented May 21, 2020

@codecov
Copy link

codecov bot commented May 21, 2020

Codecov Report

Merging #24337 into master will increase coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24337   +/-   ##
=======================================
  Coverage   98.83%   98.83%           
=======================================
  Files         363      363           
  Lines        7271     7272    +1     
  Branches     2022     2022           
=======================================
+ Hits         7186     7187    +1     
  Misses         85       85           
Impacted Files Coverage Δ
components/notification/hooks/useNotification.tsx 95.83% <75.00%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f646b6f...0d205db. Read the comment docs.

@zombieJ zombieJ merged commit e613861 into master May 21, 2020
@zombieJ zombieJ deleted the notification-hooks branch May 21, 2020 02:36
@afc163
Copy link
Member

afc163 commented May 21, 2020

image

@afc163
Copy link
Member

afc163 commented May 23, 2020

这个 changelog 写的不好,没有从用户角度出发。

@zombieJ
Copy link
Member Author

zombieJ commented May 23, 2020

嗯,我写的时候也很纠结。不知道怎么写更好些。

@afc163
Copy link
Member

afc163 commented May 23, 2020

试着写了一下:#24410 (comment)

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.

Infinite render with useNotification hook and useEffect
3 participants