minhtranite / react-notifications

Notification component for ReactJS
https://www.npmjs.com/package/react-notifications
287 stars 64 forks source link

When requesting to show multiple notifications, not all of them show #19

Closed hyperh closed 7 years ago

hyperh commented 7 years ago

Sometimes when I want to show multiple notifications within a short time period, not all of them show up. This is because the key is generated with a timestamp. This should be done using a uuid.

https://github.com/minhtranite/react-notifications/blob/master/src/NotificationManager.js#L25

LiranBri commented 7 years ago

As a quick workaround until this would get resolved, you can use setTimeout with minor milliseconds between each call.

From my experience, even if you don't give any miliseconds it would be enough in practice:

setTimeout(() => NotificationManager.error('a'));
setTimeout(() => NotificationManager.error('b'));
setTimeout(() => NotificationManager.error('c'));