minhtranite / react-notifications

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

On router change Notifications appear multiple times #34

Open avinashdvv opened 6 years ago

avinashdvv commented 6 years ago

On success network request i am showing a notification and after i am redirecting to the new page. After that if user done any other network request previous notification is also appearing again

nickbar86 commented 6 years ago

i have the same issue any news on that?

avinashdvv commented 6 years ago

@nickbar86 use this https://github.com/fkhadra/react-toastify

AshishGz commented 6 years ago

same problem can any one give me solution to solve this one

normdoow commented 5 years ago

I'm also seeing this issue.

normdoow commented 5 years ago

What I did that fixed this for me. It at least works is putting the <NotificationContainer /> up in a parent component that doesn't leave the screen. Then both of the notifications in different child components can use the same Notification container. This fixes multiple notifications happening.

AshishGz commented 5 years ago

Thank you i will now try this solution

On Thu, Jan 10, 2019 at 10:34 AM NoahBragg notifications@github.com wrote:

What I did that fixed this for me. It at least works is putting the <NotificationContainer /> up in a parent component that doesn't leave the screen. Then both of the notifications in different child components can use the same Notification container. This fixes multiple notifications happening.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/minhtranite/react-notifications/issues/34#issuecomment-452969868, or mute the thread https://github.com/notifications/unsubscribe-auth/AYkeX9hkxkRWkNK2PqrzAr_EvmuKN2m2ks5vBsZZgaJpZM4RH-Gm .

-- Ashish Gautam Software Engineer Kathmandu, Nepal

Contact: (O) +977 <+977%201-2298599>9849247257 (M) +977 <+977%20984-9096337>9818922672

[image: Please consider the environment before printing]

Usama-Tahir commented 5 years ago

What I did that fixed this for me. It at least works is putting the <NotificationContainer /> up in a parent component that doesn't leave the screen. Then both of the notifications in different child components can use the same Notification container. This fixes multiple notifications happening.

thanks. this solved my issue. I was having the same problem