ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3.04k stars 612 forks source link

SwipeAction is Warning!! componentWillMount has been renamed #1178

Closed vathunwa007 closed 3 years ago

vathunwa007 commented 3 years ago

Reproduction link

[backend.js:12356 Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/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 18.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: Swipeout](backend.js:12356 Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/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 18.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: Swipeout)

Steps to reproduce

Iam use SwipeAction is Warning componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

What is expected?

pleash Fix Bug 😭😒

What is actually happening?

This still works, but the notification needs to be hidden, which may have an impact in the future.

Environment Info
antd 4.1.0
React 17.0.1
System IOS14.4
Browser ISO14.4

Thank you for always developing something nice and easy to use for us. 🀝 πŸ‘πŸΌ

BANG88 commented 3 years ago

@vathunwa007 It fixed on another branch .