lottie-react-web icon indicating copy to clipboard operation
lottie-react-web copied to clipboard

Fix `componentWillUpdate` has been renamed warning

Open sidhantpanda opened this issue 5 years ago • 4 comments

Moves the extraction of props and eventListeners logic from componentWillUpdate to componentDidUpdate. This fixes the following warning from the console:

Warning: componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

* Move data fetching code or side effects to componentDidUpdate.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Lottie

sidhantpanda avatar Aug 25 '19 08:08 sidhantpanda

@felippenardi - could we have this merged in please? 🙏🏻

elstob avatar Sep 20 '19 10:09 elstob

would be nice to have this warning removed 👍

pinktonio avatar Jul 03 '20 15:07 pinktonio

Is it possible to get this merged? Would be awesome to get this error removed

indigomelody avatar Aug 19 '20 00:08 indigomelody

@felippenardi there is possible to get any news about the merge of this PR? Thanks

ioxFR avatar Sep 16 '20 05:09 ioxFR