You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
lijinpengFj
changed the title
react 高版本 待废弃声明周期 warnings,componentWillMount、componentWillReceiveProps
react 高版本出现待废弃声明周期的 warnings,componentWillMount、componentWillReceiveProps
Oct 8, 2019
React 版本: 16.10.2
pro-layout 版本:4.5.16
本地开发环境下,出现 warnings,以下仅为一个示例
Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
npx react-codemod rename-unsafe-lifecycles
in your project source folder.全部 warnings 如图
这两个 warnings 为 pro-layout 依赖的 react-document-title、react-conatiner-query 导致,对应的问题的 issue 为 document-title、container-query,建议持续关注
The text was updated successfully, but these errors were encountered: