gor181 / react-notification-system-redux

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

Can I pass multiple error notification when dispatching? #47

Open batuhantozun opened 7 years ago

batuhantozun commented 7 years ago

Hey, I am passing notification in my dispatchNotification method. So, I wanna pass multiple error and show a bunch of notification. How can I pass "message" like an array?

dispatchNotification(status, message) { const notificationOpts = { message, position: 'tc' }; if (status === 'success') { this.props.success(notificationOpts); } if (status === 'error') { this.props.error(notificationOpts); } }

gor181 commented 7 years ago

There is no possibility to dispatch once and have many notifications appearing. You can dispatch a notification for each of the error messages you have which would result in a lot of error notifications.