minhtranite / react-notifications

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

notification respawn after changing page #65

Open thomasInes opened 1 year ago

thomasInes commented 1 year ago

Hi,

using React 18.2.0 and react-notification 1.7.4

I have a form that displays a notification with a 5000ms timeout upon submitting. If I go to another "page" (just another component using react-router-dom) before the timeout expire and show a new notification on the new page, the previous notification reappears + the new one. I Also noticed this happens if I have many notifications. If I change the page before they expire, in that case all these previous notifications will show up again + the new one in the new page.

Is there anything I can do to avoid that, or is a fix needed?

Thanks