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

SwipeOut component is throwing deprecation alerts #1165

Closed mcallisto closed 3 years ago

mcallisto commented 3 years ago

What problem does this feature solve?

Using the component in React 16.x results in:

Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

    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.

Please update the following components: SwipeOut

What does the proposed API look like?

SwipeOut component not depending on a deprecated library