react-css-themr
react-css-themr copied to clipboard
Remove warning caused due to usage of componentWillRecieveProps
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
@javivelasco Please review and merge this if this is fine. All tests are passing.