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

useEffect not cancelling timeouts. #49

Closed revickulous2001 closed 4 years ago

revickulous2001 commented 4 years ago

I have just installed this project, and I am receiving the following error/warning:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function. in Toast (created by ToastContainer)

This seems to be due to the fact that the timeouts aren't cancelled in the useEffect hook in the Toast component.

anmdotdev commented 4 years ago

Fixed in v4.2.2