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.

Warning Warning: componentWillReceiveProps has been renamed, and is not recommended for use

See original GitHub issue

I,m using last stable version and get this warning.

react-dom.development.js:12050 Warning: componentWillReceiveProps 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.
  • If you’re updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
  • Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps 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: ColorPicker, EditableInput

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:44
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
casesandbergcommented, Jan 8, 2020

This was fixed with https://github.com/casesandberg/react-color/pull/662 and will be released shortly as react-color@2.18.0

7reactions
hlodvercommented, Sep 3, 2019

If you are impatient like me you can use patch-package. It is much easier than forking etc.

The patch file I am using is here: https://gist.github.com/hlodver/ee336b071f2b2b85c4903660fb8cd686

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - componentWillReceiveProps has been renamed
Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the ...
Read more >
Warning: componentWillReceiveProps has been ... - GitHub
componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
Read more >
Warning: componentWillMount has been Renamed, and is not ...
Learn what causes "Warning: componentWillMount has been renamed, and is not recommended for use."
Read more >
Suppressing legacy lifecycle method warnings in tests for ...
Warning : componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles ...
Read more >
componentWillReceiveProps warning - Questions - Babylon.js
*Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles ...
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