react-semantic-toasts icon indicating copy to clipboard operation
react-semantic-toasts copied to clipboard

Toaster appears twice

Open millerox opened this issue 5 years ago • 2 comments

Thanks for the toast, it's really easy to use!

When a condition met, toast appears in a particular component. SemanticToastContainer is placed inside of the component. When a user navigates to another component, and then comes back and toast condition is met again, two toasters appear.

An issue can be solved, if move SemanticToastContainer to the higher hierarchy. However, in my case, I need toast time option to be 0 (toaster do not disappear until the user clicks close icon). If I move SemanticToastContainer to the higher hierarchy, toaster stays on all the pages/components until the user closes it.

I would like the toaster to stay or until the user close it, or until the user navigate to another context . Any suggestions how it can be solved? thanks!

millerox avatar Sep 10 '19 13:09 millerox

I tried this too but it still occurs despite being at the highest hierarchy.

andrew-mclachlan avatar Jul 04 '20 09:07 andrew-mclachlan

I think my issue has been resolved. My issue was not with the Toast or the container, but when it was invoked/called. I had the toast inside an event emitter that wasn't within my React's useEffect.

andrew-mclachlan avatar Jul 14 '20 16:07 andrew-mclachlan