react-livechat icon indicating copy to clipboard operation
react-livechat copied to clipboard

Warning: componentWillMount has been renamed, and is not recommended for use

Open Simba-Mupfunya opened this issue 6 years ago • 1 comments

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

Simba-Mupfunya avatar May 15 '20 14:05 Simba-Mupfunya

Hello @Simba-Mupfunya 👋

I am happy to say that we have created a new set of packages to support more frontend frameworks integration with LiveChat Chat Widget: Chat Widget Adapters 🙂

From now on it will be the official, actively maintained repository for each framework-specific package that allows easy integration of LiveChat Chat Widget. The Hooks API is one part of the new React package: @livechat/widget-react.

In new implementation the class components and React lifecycle methods are no longer used instead we use function components and Hooks which will resolve all deprecation warnings related to them 😉

walaszczykm avatar Jan 20 '22 11:01 walaszczykm