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: componentWillReceiveProps has been renamed, and is not recommended for use.

See original GitHub issue

With react 16.9+, componentWillReceiveProps has been deprecated. Due to the large range of supported react versions with react-placeholder, a fix for this will require a major version change. The current uses could be moved to UNSAFE_componentWillReceiveProps, but I’m not sure if that is available as far back as react 0.14. Is it time for a version that requires react 16.8+ and is built with hooks? 😄

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
BrianMitchLcommented, Dec 8, 2019

This issue has been pretty quiet, so I’d be happy to take it on! A couple of things come across my mind first:

  1. I would like to propose dropping support for react <16.8.0 so it can be built using hooks.
  2. With the high usage of TypeScript in recent years, and added complexity with mixing prop-types and Typescript, I think that prop-types could be removed.
  3. I think the build tooling could switch to rollup, even using something like tsdx would make this really easy.

To do this upgrade, I would first enhance the test suite for the current version. Then migrate to hooks and function components, and ensure that the tests still pass, or do with minimal changes.

Any thoughts?

1reaction
gromchencommented, Oct 3, 2019

It would be nice to have 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
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