react-select icon indicating copy to clipboard operation
react-select copied to clipboard

Warning: componentWillReceiveProps has been renamed

Open IftekherSunny opened this issue 7 years ago • 35 comments

Getting this warning !!!!

Warning: componentWillReceiveProps has been renamed

Screenshot

IftekherSunny avatar Aug 16 '19 16:08 IftekherSunny

react-dom.development.js:11494 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: Select

eugene-tea avatar Aug 16 '19 16:08 eugene-tea

This is fixed by #3487.

jakeboone02 avatar Aug 16 '19 17:08 jakeboone02

@jakeboone02 - I'm on version 3.0.4 and it still warns about this. I can even see it being used in the source code?

NordlingDev avatar Aug 23 '19 09:08 NordlingDev

@NordlingDev That is because @jakeboone02 references a pullrequest but the pullrequest is not merged yet.

oscarteg avatar Aug 23 '19 14:08 oscarteg

Any idea when this will be merged? trying to remove these warnings...

rachelleahr avatar Aug 23 '19 14:08 rachelleahr

@rachelleahr Pull request #3716 fixes it and is merged, but I don't know when it will be released.

oscarteg avatar Aug 23 '19 15:08 oscarteg

Any news on when this will be released?

absenteerealitycheck avatar Aug 29 '19 13:08 absenteerealitycheck

@gwyneplaine When is the next release planned?

rachelleahr avatar Aug 29 '19 15:08 rachelleahr

Does anybody know what is the solution for it? Still having this warning

dbsimeonov avatar Sep 03 '19 20:09 dbsimeonov

it fixed? but I have installed react 16.9.0 and react-select 3.0.4 using NPM. and I still got the warning

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

isggwp avatar Sep 18 '19 04:09 isggwp

Not fixed atm

Kiyozz avatar Sep 18 '19 06:09 Kiyozz

1

yanlee26 avatar Sep 18 '19 12:09 yanlee26

+1

ranneyd avatar Sep 19 '19 23:09 ranneyd

Everyone retweet this lmao

https://twitter.com/dustinpkane/status/1174838579056394241

ranneyd avatar Sep 20 '19 00:09 ranneyd

So I'm going to drop this here.

https://www.npmjs.com/package/react-select-temp

I'm not happy about it either. I'm just using this to make the warning go away until the maintainers in this lib sort this out. I'm going to continue to monitor the threads and switch back to the real package once this one is ready.

I just took this PR, published to NPM, then updated this lib to use that one. https://github.com/JedWatson/react-input-autosize/pull/167

Everything we need to make this warning go away exists. We just need the maintainers of this lib to press some buttons.

ranneyd avatar Sep 25 '19 17:09 ranneyd

We use https://github.com/ds300/patch-package to patch unsupported lifecycle methods.

razh avatar Sep 26 '19 19:09 razh

Sorry for the delay everyone, we've now published 3.0.6 with @ranneyd's fix to react-input-autosize, thanks again :)

Looking forward to refactoring rs to truly deprecate usage of these lifecycles soon, thank you al lfor your patience 🙏 it really is appreciated

gwyneplaine avatar Oct 01 '19 05:10 gwyneplaine

Thanks for updates. I've just switched to 3.0.6 but still see same warning Screenshot 2019-10-01 at 11 37 07

aleksfront avatar Oct 01 '19 08:10 aleksfront

@aleksfront thanks for this, I've released 3.0.7 with a fresh yarn.lock which should result in resolved warnings, please let me know if the problem persists 👍

gwyneplaine avatar Oct 01 '19 09:10 gwyneplaine

Confirming that 3.0.7 working smoothly without warnings.

aleksfront avatar Oct 01 '19 09:10 aleksfront