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.

received following warning of componentWillReceiveProps has been renamed about 'Select':

See original GitHub issue

received following warning about ‘Select’:

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:18
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
DalderupMauricecommented, Jan 3, 2020

Latest version of the lib is fixed fyi

I still get this warning in version react-select@3.0.8

The error message:

index.js:1 Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles 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

Please update the following components: AutosizeInput, Select

And when opening the dropdown I get this:

index.js:1 Warning: Legacy context API has been detected within a strict-mode tree.

The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: MenuPlacer

Learn more about this warning here: https://fb.me/react-legacy-context
    in StrictMode (at Root.tsx:15)
    in Unknown (at src/index.tsx:10)

and this:

findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of NodeResolver which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node
4reactions
jrusso1020commented, Sep 9, 2019

Just update my output says

 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: AutosizeInput, Select

So both the AutosizeInput and Select components need to be updated

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 renamed ...
getDerivedStateFromProps is one of those newly introduced lifecycle method replacing componentWillReceiveProps, which has now become ...
Read more >
Warning: componentWillMount has been Renamed, and is not ...
Warning : componentWillMount has been renamed, and is not recommended for use. Initializing state // Before class AppComponent extends React.
Read more >
componentWillReceiveProps has been renamed, and is not ...
Hi. I am using import { BottomSheet } from 'react-native-btr'; for select checkbox. whenever i click the bottom sheet button i am facing ......
Read more >
error screens - Public snippets - Snipit.io
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
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