'React js give me a unknown warning, I cant fix it,

I use React for frontend, I am facing a warning in React. I tried a lot but couldn't get rid of it.

warning : react_devtools_backend.js:3973 Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.

  • Move code with side effects to componentDidMount, and set initial state in the constructor.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source