animate icon indicating copy to clipboard operation
animate copied to clipboard

Deprecated lifecycle method warnings with React 16.9

Open Dizotoff opened this issue 5 years ago • 5 comments

The following warning is shown upon upgrading to React 16.9.0:

      Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

      * Move data fetching code or side effects to componentDidUpdate.
      * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
      * 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.

      Please update the following components: Animate

Dizotoff avatar Aug 22 '19 07:08 Dizotoff

Any roadmap on this? We are currently updating to the newest version of antd - I guess when React 17 releases antd will be ready and not use any deprecated lifecycle hooks anymore?! 😄

Twisterking avatar Aug 28 '19 12:08 Twisterking

@Twisterking I'm utilizing rc-tooltip component which uses rc-animate. When I click the tooltip, a warning appears.

Dizotoff avatar Aug 29 '19 13:08 Dizotoff

Any update for this, guys?

sunsetninja avatar Sep 04 '19 11:09 sunsetninja

antd v4 using rc-animate/CSSMotion instead of rc-animate/Animate. All related react component will be updated. You can check progress here: https://github.com/ant-design/ant-design/issues/19169

zombieJ avatar Oct 17 '19 01:10 zombieJ

@zombieJ and what about AntD mobile?

Indigo744 avatar Nov 04 '19 12:11 Indigo744