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.

[BUG] - Warning: componentWillReceiveProps has been renamed

See original GitHub issue

Getting this warning !!!

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: NumericInput

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
nccharlescommented, Apr 27, 2020

Badly this has no solution but changing this function and replace it with componentDidMount in the source code of the package. So you will have to wait till they update it or you could clone this repo and edit it by yourself then publish it to the npm and use your own library. Edit: I looked at the Pull requests and i found this one resolves this issue PR #49, so you will have to wait till they merge it, hope they do it soon.

I did it @YahiaBadr and it works properly in my app. Actually the source updated but they didn’t update NPM. I would recommend someone to do this.

2reactions
YahiaBadrcommented, Apr 25, 2020

Badly this has no solution but changing this function and replace it with componentDidMount in the source code of the package. So you will have to wait till they update it or you could clone this repo and edit it by yourself then publish it to the npm and use your own library. Edit: I looked at the Pull requests and i found this one resolves this issue PR #49, so you will have to wait till they merge it, hope they do it soon.

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
Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the ...
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 >
1601730 - Clear all Javascript test warnings - Bugzilla@Mozilla
... node_modules/react-dom/cjs/react-dom.development.js:12357 Warning: componentWillReceiveProps has been renamed, and is not recommended for use.
Read more >
Warning: componentWillReceiveProps has been renamed
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for ...
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