question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsafe hook componentWillUpdate

See original GitHub issue

Hi guys I’ve just enabled React.strictMode for my app and the only warning I get is related to Lottie

index.js:1446 Warning: Unsafe lifecycle methods were found within a strict-mode tree:
    in StrictMode

componentWillUpdate: Please update the following components to use componentDidUpdate instead: Lottie

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings

That’s the indicted code, is there a safe way to remove the hook without compromising how Lottie work?

Thank you for all 😊 Stefano

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:11
  • Comments:7

github_iconTop GitHub Comments

5reactions
mificommented, Jul 12, 2020

I made a complete rewrite using modern hooks: react-lottie-player. No more deprecation warnings!

4reactions
vaskecommented, Oct 31, 2019

Guys did you drop further development? You didn’t released since 14 Jun 2018

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating From Unsafe React Lifecycle Hooks.
Migrating From Unsafe React Lifecycle Hooks. ... this new lifecycle should cover all use cases for the legacy componentWillUpdate .
Read more >
unsafe react hooks
useMemo() React hook specify all the props in an array that are dependent, it will run before everything whenever the props change. Together ......
Read more >
ReactJS UNSAFE_componentWillUpdate() Method
The componentWillUpdate() method provides us the control to manipulate our React component just before it receives new props or state values ...
Read more >
Why is componentWillMount(), componentWillUpdate() and ...
To avoid this issue, componentDidUpdate() is introduced, which will invoked only once per update. Note: componentWillReceiveProps is also unsafe ...
Read more >
Unsafe legacy lifecycle methods should not be defined ...
In React v16.3, componentWillMount() , componentWillReceiveProps() , and componentWillUpdate() are marked as unsafe legacy lifecycle methods ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found