Yoctol / react-d3-cloud

A word cloud react component built with d3-cloud.
https://yoctol.github.io/react-d3-cloud
MIT License
138 stars 47 forks source link

When using libery warning message : React 17.x Warning: componentWillMount has been renamed #118

Closed ntedgi closed 3 years ago

ntedgi commented 4 years ago

Node : v8.17.0 Ubuntu : 19 Chrome : 83.0.4103.97 (Official Build) (64-bit) npm : 6.13.4 React : 16.6.3

warning display in DevTools

react-dom.development.js:88 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 UNSAFEcomponentWillMount 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: WordCloud printWarning @ react-dom.development.js:88

chentsulin commented 3 years ago

v0.8.0 has been rewritten with React Hooks, so this isn't an issue anymore.