react-css-themr icon indicating copy to clipboard operation
react-css-themr copied to clipboard

Remove warning caused due to usage of componentWillRecieveProps

Open rishichawda opened this issue 6 years ago • 1 comments

Since componentWillRecieveProps will not be supported in future versions of react (v17.0), when used with static getDerivedStateFromProps method in a component it throws a warning that it contains legacy lifecycle method (v16.4 and above). Using shouldComponentUpdate to check props and re-render the component provides us with a way to do the same without componentWillRecieveProps. Also, now we don't need to pass props between themr component's methods since we can access updated props through this.

This also 'future-proofs' react-css-themr for React. 94

rishichawda avatar Oct 31 '18 10:10 rishichawda

@javivelasco Please review and merge this if this is fine. All tests are passing.

rishichawda avatar Oct 31 '18 10:10 rishichawda