Open breeny opened 5 years ago
https://github.com/Adobe-Marketing-Cloud/target-atjs-extensions/blob/f689187eebf5cbbeabbcd76280907f5e68ce3a4f/react/component/src/component.jsx#L24-L26
As per the React documentation, componentWillReceiveProps is a deprecated method, slated for removal in v17.
componentWillReceiveProps
One possible solution would be to change the implementation of shouldComponentUpdate and then leverage componentDidUpdate (I am aware of https://github.com/Adobe-Marketing-Cloud/target-atjs-extensions/issues/37 which may or may not make this possible).
shouldComponentUpdate
componentDidUpdate
Otherwise another option may be to trigger these side effects in the shouldComponentUpdate call, which seems like an anti pattern but is the first and only method that would be called if the implementation stays as returning false.
https://github.com/Adobe-Marketing-Cloud/target-atjs-extensions/blob/f689187eebf5cbbeabbcd76280907f5e68ce3a4f/react/component/src/component.jsx#L24-L26
As per the React documentation,
componentWillReceiveProps
is a deprecated method, slated for removal in v17.One possible solution would be to change the implementation of
shouldComponentUpdate
and then leveragecomponentDidUpdate
(I am aware of https://github.com/Adobe-Marketing-Cloud/target-atjs-extensions/issues/37 which may or may not make this possible).Otherwise another option may be to trigger these side effects in the
shouldComponentUpdate
call, which seems like an anti pattern but is the first and only method that would be called if the implementation stays as returning false.