Cogoport/cogo-toast

Only allows one notification at a time.

Closed this issue · 2 comments

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?

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

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).