gor181 / react-notification-system-redux

Redux wrapper for react-notification-system
MIT License
324 stars 59 forks source link

`hide` will cause `RNS_HIDE_NOTIFICATION` raise twice #40

Open geminiyellow opened 7 years ago

geminiyellow commented 7 years ago

when i use dispatch(Notifications.hide), it will cause RNS_HIDE_NOTIFICATION twice. anybody can tell me why?

gor181 commented 7 years ago

Hi @geminiyellow,

Do you perhaps have the code doing that? Are you sure you are not dispatching it somewhere once again? If you do not I assume the dispatch comes from => https://github.com/gor181/react-notification-system-redux/blob/master/src/notifications.js#L33 where we dispatch a hide action as soon react-notification-system removes the notification. That can happen when the autoDimiss is set.

geminiyellow commented 7 years ago

autoDismiss, OK let me check.