Resizing a window that includes ReflexContainer results in a runtime error with the message "Unable to find node on an unmounted component."
Changes
Removes findDOMNode usage on ReflexContainer, replacing with a custom ref on ReflexContainer. This is in accordance with the suggestion from React here: https://reactjs.org/docs/react-dom.html#finddomnode
Ensures that the window resize listener is removed when the component is unmounted. This avoids setting state on the unmounted component.
Issue
Resizing a window that includes
ReflexContainer
results in a runtime error with the message "Unable to find node on an unmounted component."Changes
findDOMNode
usage onReflexContainer
, replacing with a custom ref onReflexContainer
. This is in accordance with the suggestion from React here: https://reactjs.org/docs/react-dom.html#finddomnode