idyll-lang/idyll

React lifecycle warning

Open

#711 opened on Mar 10, 2021

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (1,977 stars) (97 forks)batch import
ComponentsGood First PRRough EdgesRuntimehelp wanted

Description

Describe the bug Some components depend on React lifecycle methods that are being deprecated, see this warning:

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.\n

To Reproduce Create the default idyll article and look at terminal and JS console.

Expected behavior There are no warnings from React. I believe the idyll-document component relies on this method, as well as several components in idyll-components, including at least table, maybe others.

Contributor guide