souporserious/react-measure

Remove usages of unsafe lifecycle methods

Hypnosphi opened this issue · 3 comments

React team recently published a blogpost: https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html

TL;DR: cWM, cWRP, and cWU 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 use react-lifecycles-compat package and migrate to new static getDerivedStateToProps method

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.

componentWillReceiveProps(nextProps) {

Ah true! I'll make sure to update the examples 😇 thanks!