idiotWu / react-smooth-scrollbar

[Not Actively Maintained] A wrapper for smooth-scrollbar to React Component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strict Mode compatibility: removing `componentWillReceiveProps`

NoriSte opened this issue · 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