Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

While upgrading to react 16.9 - getting an error: "Please update the following components: t"

Tags:

reactjs

While upgrading to React 16.9 i am getting the following error. The problem is that i do not have component named: "t". how can i get the real name of it? I don't have unsafe methods on my code so i assume its related to 3rd party lib.

bundle.js:174471 Warning: componentWillReceiveProps has been renamed, and is not recommended for use

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

  • 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: t

like image 310
Omtechguy Avatar asked Sep 12 '19 09:09

Omtechguy


1 Answers

I experienced the same after upgrading to React 16.9.

It is not easy to track down the root of the warnings (I switched parts of the code on/off until I had the warning isolated).

For me it turned out to be the react-moment library. There's an open issue in that project to resolve the warning: https://github.com/headzoo/react-moment/issues/96

like image 86
Rob van der Leek Avatar answered Sep 28 '22 05:09

Rob van der Leek