react-smooth-scrollbar icon indicating copy to clipboard operation
react-smooth-scrollbar copied to clipboard

Strict Mode compatibility: removing `componentWillReceiveProps`

Open NoriSte opened this issue 5 years ago • 0 comments

In order to fully support React Strict mode componentWillReceiveProps should be renamed or, better, replaced at all. Putting all its logic into componentDidUpdate (before the this.scrollbar.update() code) is trivial (and I'd more than happy doing to do that) but I'd like to know if there are some reasons that must be considered before doing that.

This would solve the following warning

Warning: Legacy context API has been detected within a strict-mode tree. The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Thanks Stefano

NoriSte avatar Aug 04 '20 10:08 NoriSte