This fixes updating the component after it has been unmounted already. The component is showing a warning otherwise. Being:
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.
This fixes updating the component after it has been unmounted already. The component is showing a warning otherwise. Being:
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.