You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the StatefulDashboard component.
and on farther inspection it appears my Dashboard component, which had already unmounted was connected to a store that had been modified. The connectToStores#onChange was called, which in turn called this.setState(...), resulting in the above Warning message.
I'm thinking an isMounted() check would be applicable in the onChange method:
onChange: function onChange() {
if ( this.isMounted() ) {
this.setState(Spec.getPropsFromStores(this.props, this.context));
}
},
Updating like so resolves the issue on my end. Let me know if you agree, and I can create a PR
The text was updated successfully, but these errors were encountered:
I have this exact issue. A component that is connected to a store (isLoggedIn) calls actions.logout() which in-turn causes a parent component to unmount the isLoggedIn component. It appears that after the isLoggedIn is unmounted it receives an update from the store.
I came across the following Warning in my app
and on farther inspection it appears my Dashboard component, which had already unmounted was connected to a store that had been modified. The connectToStores#onChange was called, which in turn called this.setState(...), resulting in the above Warning message.
I'm thinking an isMounted() check would be applicable in the onChange method:
Updating like so resolves the issue on my end. Let me know if you agree, and I can create a PR
The text was updated successfully, but these errors were encountered: