react-notifications icon indicating copy to clipboard operation
react-notifications copied to clipboard

On router change Notifications appear multiple times

Open avinashdvv opened this issue 7 years ago • 7 comments

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

avinashdvv avatar Dec 20 '17 06:12 avinashdvv

i have the same issue any news on that?

nickbar86 avatar Feb 08 '18 12:02 nickbar86

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

avinashdvv avatar Feb 13 '18 18:02 avinashdvv

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

AshishGz avatar Jun 06 '18 07:06 AshishGz

I'm also seeing this issue.

normdoow avatar Jan 10 '19 04:01 normdoow

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.

normdoow avatar Jan 10 '19 04:01 normdoow

Thank you i will now try this solution

On Thu, Jan 10, 2019 at 10:34 AM NoahBragg [email protected] 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

http://gmail.com*

[image: Please consider the environment before printing]

AshishGz avatar Jan 10 '19 05:01 AshishGz

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

Usama-Tahir avatar Apr 18 '19 11:04 Usama-Tahir