Cogoport / cogo-toast

Beautiful, Zero Configuration, Toast Messages for React. Only ~ 4kb gzip, with styles and icons
https://cogoport.github.io/cogo-toast
MIT License
673 stars 1 forks source link

Only allows one notification at a time. #52

Closed ronenmagid closed 4 years ago

ronenmagid commented 4 years ago

When tested (latest React React 16.12.0, latest cogo-toast version (yarn added today).

componentDidMount() {
    cogoToast.success('This is a success message');
    cogoToast.info('This is a info message');
    cogoToast.warn('This is a warn message');
    cogoToast.error('This is a error message');

only the last message shows. The others simply do not appear. What am I doing wrong?

ronenmagid commented 4 years ago

I wasn't using this right. Although the right usage isn't very obvious from the documentation. sorry for creating this ripple.

nelsonpecora commented 4 years ago

Hi, we're seeing exactly the same problem (trying to trigger two toasts inside of a useEffect() hook). How did you get around this? It'd definitely not obvious from the docs, and the source of the homepage (which triggers all of the toasts at once) simply calls them from a forEach loop (which we tried, but no dice).