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.

react-unsafe-component-lifecycles waring

See original GitHub issue

Hi @justinrhodes1, thanks for library.

When I test components that include the library I am getting the following warning

Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount 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: Tooltip

It is possible to update it to fix it.

Thank you

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
justinrhodes1commented, Jun 26, 2020

@cmoreno-sf Sure! I will work on a new version over the weekend and fix that.

0reactions
ncesarcommented, Feb 2, 2022

I have created a package that fix this bug and is based on this package. Try: npm i react-power-tooltip-hooks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unsafe legacy lifecycle methods should not ... - Rule | DeepScan
In React v16.3, componentWillMount() , componentWillReceiveProps() , and componentWillUpdate() are marked as unsafe legacy lifecycle methods for ...
Read more >
Suppressing legacy lifecycle method warnings in tests for ...
If React detects that a component uses legacy method it issues a warning (through call to console.warn) such as this: ...
Read more >
React.Component
Each component has several “lifecycle methods” that you can override to run code at particular times in the process. You can use this...
Read more >
Warning: componentWillMount has been Renamed, and is not ...
Starting in React version 16.3, the following component lifecycle methods are being phased out. componentWillMount; componentWillReceiveProps ...
Read more >
`componentWillMount` warnings visible even though ...
Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will ...
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