Strict Mode compatibility: removing `componentWillReceiveProps`
NoriSte opened this issue · comments
Stefano Magni commented
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