idyll-lang/idyll

React lifecycle warning

开放

#711 创建于 2021年3月10日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (97 个派生)batch import
ComponentsGood First PRRough EdgesRuntimehelp wanted

仓库指标

星标
 (1,977 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南