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
Despite the elementResizeDetector listener is uninstalled before the ContainerDimensions component gets unmounted, I got this 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.
Please check the code for the ContainerDimensions component."
I only get this warning in a particular scenario where the ContainerDimensions component is rendered in a tab menu component, but I can't figure out why this case is so particular.
I temporarily fix it by adding an instance variable set to true before the onResize callback is called in componentDidMount lifecycle method, set to false in componentWillUnmount and checked before calling setState in the onResize callback.
I suppose it's not a problem with this library itself but with the element-resize-detector library. I hope you could sort it out anyway.
The text was updated successfully, but these errors were encountered:
Despite the
elementResizeDetector
listener is uninstalled before the ContainerDimensions component gets unmounted, I got this 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.
Please check the code for the ContainerDimensions component."
I only get this warning in a particular scenario where the ContainerDimensions component is rendered in a tab menu component, but I can't figure out why this case is so particular.
I temporarily fix it by adding an instance variable set to true before the
onResize
callback is called incomponentDidMount
lifecycle method, set to false incomponentWillUnmount
and checked before callingsetState
in theonResize
callback.I suppose it's not a problem with this library itself but with the element-resize-detector library. I hope you could sort it out anyway.
The text was updated successfully, but these errors were encountered: