react-block-ui icon indicating copy to clipboard operation
react-block-ui copied to clipboard

React 16.9 warning - componentWillReceiveProps

Open domehead100 opened this issue 5 years ago • 16 comments

Just an FYI... with react 16.9 I see the warning below. Seems componentWillReceiveProps is used in one place in the src (and a few places in tests).

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

domehead100 avatar Sep 10 '19 11:09 domehead100

Appreciate it, we are moving this project to a package under another project. With that its being rewritten with hooks and this warning will be removed.

GoPro16 avatar Sep 10 '19 13:09 GoPro16

@GoPro16 what project will contain this? I'm leery of taking on this as a dependency if it's likely to move to a project that contains other pieces I don't need. Thanks!

wrogersTBS avatar Sep 10 '19 15:09 wrogersTBS

@wrogersTBS we would just be moving this to a mono repo https://github.com/Availity/availity-react that helps us manage a bunch of independent libraries. This move simply reduces are support cost and should not impact the usage of this library.

robmcguinness avatar Sep 10 '19 16:09 robmcguinness

@robmcguinness when would you plan to move to another repo and rewrite into use effect?

epotockiy avatar Dec 28 '19 15:12 epotockiy

@epotockiy not sure but I will make inquiry.

robmcguinness avatar Dec 28 '19 17:12 robmcguinness

@epotockiy you can watch #33 for any progress made to that. We are working on getting our components to compile and then will most likely revisit this issue when we make the move to the other react mono repo.

Exact timeline is not known but feel free to submit a PR if you want to give it a whirl

GoPro16 avatar Dec 28 '19 18:12 GoPro16

Is there progress on this warning?

seanonthenet avatar Nov 18 '20 10:11 seanonthenet

Is there progress on this warning?

prince272 avatar Mar 04 '21 14:03 prince272

Is there progress on this warning?

prince272 avatar Mar 04 '21 14:03 prince272

Still hitting this warning. Any status updates?

JMo911 avatar Apr 08 '21 19:04 JMo911

Is there progress on this warning?

prince272 avatar May 04 '21 11:05 prince272

It seems the owner is no more or has left the repository to perish.

prince272 avatar May 11 '21 09:05 prince272

any update on this warning?

xSynack avatar Jul 30 '21 02:07 xSynack

i am working on this.

nylon22 avatar Dec 29 '21 16:12 nylon22

Any update on progress?

dvparth avatar Mar 17 '22 10:03 dvparth

@dvparth see https://github.com/Availity/availity-react/pull/952 for some more details. @jordan-a-young has worked on converting this package to use hooks and TS and has proposed moving it into our availity-react repo for easier maintenance. We are also considering renaming the package, and will provide a codemod to make any migrations easier if that's the route we go

chrishavekost avatar Mar 21 '22 13:03 chrishavekost