If I start an alert on one page, then switch to another page before the alert completes, the timeout of the previous page's alert container will still run and try to call setState, causing an error/warning:
"Warning: Can only update a mounted or mounting component. This usually means you called setState, replaceState, or forceUpdate on an unmounted component. This is a no-op.".
It would be nice to have a method available on the AlertContainer to clear it's timeout prematurely so that on my parent component's componentWillUnmount lifecycle method I can stop the timeout from continuing to run.
I have 4 pages, each with the AlertContainer.
If I start an alert on one page, then switch to another page before the alert completes, the timeout of the previous page's alert container will still run and try to call setState, causing an error/warning:
It would be nice to have a method available on the AlertContainer to clear it's timeout prematurely so that on my parent component's componentWillUnmount lifecycle method I can stop the timeout from continuing to run.
Thanks