schiehll / react-alert

alerts for React
MIT License
607 stars 99 forks source link

Warning: Can't call setState (or forceUpdate) on an unmounted component. #79

Closed rj-david closed 6 years ago

rj-david commented 6 years ago

When timeout has not elapsed yet and the component is unmounted, I'm getting this error once the timeout elapsed.

Warning: Can't call setState (or forceUpdate) 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 the componentWillUnmount method.
    in Provider (created by ComponentWithDefaultLayout)
schiehll commented 6 years ago

Closed with #80, thanks to @rj-david!