-
Notifications
You must be signed in to change notification settings - Fork 59
notifications state not clearing with autoDismiss #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You probably want to update previous notification. please see the demo here. |
Thanks but shouldnt the autoDismiss not require the removeNotification() to be called ? |
Why do you want. |
I guess i was just asking if autoDismiss should automatically called removeNotification and whether or not there was a potential race condition. We are seeing issues intermittently if we call Notifications.success() and then later call it again, we see the previous message stacked underneath again so it looks like a double notification. |
Yes this is probably due to race condition. In my opinion redux based logic could have been improved. I don't understand why are we keeping all notifications in redux. We should have used redux just to send messages to React component and after message consumed we should have clear all notifications from the redux store. I have implemented this way and now not having this kind of issues. |
I think i figured out whats going on. if i click an action, a message gets dispatched, but before the autoDismiss fires , I click to another page. The notification gets stuck in the store... Need to see how the autoDismiss logic is managed, i guess the setTimeout() is getting cancelled and the message is getting stuck. https://github.com/igorprado/react-notification-system/blob/master/src/helpers.js#L15 |
Hi -
I have a situation where i call a Notifications.success() and the notifications state in redux (using autoDismiss) does not auto remove. This causes a double notification to show up when the next notification is triggered.
It doesnt happen every time but every so often i see this case. autoDismiss is set to 5 and the next event happens well after 5 seconds.
Any ideas ?
The text was updated successfully, but these errors were encountered: