Open Hypnosphi opened 6 years ago
Thanks for the heads up! This won't be a problem in the new version :) please feel free to follow along here. I'll close this once it is released.
AFAIS this branch uses those lifecycles as well e.g. https://github.com/souporserious/react-measure/blob/03cf3a2046d971218c23ece7bde9614f64d42173/example/components/Collapse.js#L21
Ah true! I'll make sure to update the examples 😇 thanks!
React team recently published a blogpost: https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
TL;DR:
cWM
,cWRP
, andcWU
methods are considered unsafe for future async rendering and will be deprecated soon. The recommended way for open source maintainers to deal with it is to usereact-lifecycles-compat
package and migrate to newstatic getDerivedStateToProps
method