KyleAMathews / react-headroom

Hide your header until you need it
https://kyleamathews.github.io/react-headroom
MIT License
1.83k stars 149 forks source link

migrate from componentWillReceiveProps #168

Closed janczizikow closed 4 years ago

janczizikow commented 4 years ago

Fixes #167

Replaced componentWillReceiveProps lifecycle method with getDerivedStateFromProps and componentDidUpdate. This is a breaking change as getDerivedStateFromProps was added in react 16.3.0. I updated package.json peerDependencies to reflect that.

endymion1818 commented 4 years ago

Thanks @janczizikow, I'm going to clear up the rest of the PRs before I get to this one, but I will get to it!

endymion1818 commented 4 years ago

I've tested and this is good. I'm just in the process of reaching out to a few of the major dependents of this repo to let them know we have a breaking change coming.