Comments (2)
const key = notice.key = notice.key || getUuid();
假如key = getUuid()
这不是可以一直不重复吗?这样做的意义什么呢?,
就算有maxCount 的限制也只需要删掉最前面的一个就可以了,这样做的目的是为了什么,性能问题么?
小白请教下
遍历notices
时你不需要key
吗?remove
的时候不需要唯一标识吗?
from notification.
看了下19年2月份的3.3.1版本,和现在版本基本一致
该语句只是对外暴露了一个可以自行控制 key 的接口,方便自行做些小优化,比如dom重用,或者有特殊需求需要指定的key值
做通用组件肯定会思考其扩展性,不会想当然的什么就是什么
from notification.
Related Issues (20)
- 建议:使用 useImperativeHandle hook 代替 ref callback HOT 2
- 删除updateKey后,引发的问题
- 建议允许传入ClassName HOT 1
- Unable to close notification since on release v4.5.0 HOT 6
- [Bug] simple demo-updatable
- Why it does't come to center? If there miss something? HOT 1
- 希望增加 props 可控 onMouseEnter onMouseLeave。
- CloseIcion not working
- How to use it with React 18 without warning HOT 1
- Not working with react 18 HOT 3
- Accessibility: making notifications visible to screen readers?
- Please update README for the hook verison notification. HOT 1
- [v4.6.0] It seems that you should use `??` Instead of `| |` HOT 9
- Unable to close notification using the Enter key
- rc-notification v5 has no "export default", readme need to update HOT 1
- 谷歌标签页休眠导致maxCount属性失效
- 项目里如何只在一处地方添加`contextHolder`
- Fix the style conflict in notice-wrapper and notice HOT 1
- Notification.newInstance 的方法是在源码的哪里定义的 HOT 1
- Close button is not clickable when stack is used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notification.