Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

React 16.9 warning - componentWillReceiveProps #42

Open
domehead100 opened this issue Sep 10, 2019 · 16 comments
Open

React 16.9 warning - componentWillReceiveProps #42

domehead100 opened this issue Sep 10, 2019 · 16 comments
Assignees

Comments

@domehead100
Copy link

domehead100 commented Sep 10, 2019

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
@GoPro16
Copy link
Contributor

GoPro16 commented Sep 10, 2019

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.

@wrogersTBS
Copy link

@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!

@robmcguinness
Copy link

@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.

@epotockiy
Copy link

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

@robmcguinness
Copy link

@epotockiy not sure but I will make inquiry.

@GoPro16
Copy link
Contributor

GoPro16 commented Dec 28, 2019

@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

@seanonthenet
Copy link

Is there progress on this warning?

2 similar comments
@prince272
Copy link

Is there progress on this warning?

@prince272
Copy link

Is there progress on this warning?

@JMo911
Copy link

JMo911 commented Apr 8, 2021

Still hitting this warning. Any status updates?

@prince272
Copy link

Is there progress on this warning?

@prince272
Copy link

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

@xSynack
Copy link

xSynack commented Jul 30, 2021

any update on this warning?

@nylon22
Copy link
Member

nylon22 commented Dec 29, 2021

i am working on this.

@dvparth
Copy link

dvparth commented Mar 17, 2022

Any update on progress?

@chrishavekost
Copy link

@dvparth see Availity/availity-react#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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests