dancormier / react-native-swipeout

iOS-style swipeout buttons behind component
MIT License
2.62k stars 645 forks source link

Unsafe Component Warning #342

Open singamnv opened 4 years ago

singamnv commented 4 years ago

Hi, I am getting this warning with using Swipeout:

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

Please update the following components: Swipeout "

Same thing for componentWillMount.

Suggestions?

Thank you,

singamnv commented 4 years ago

Of note, using npx react-codemod rename-unsafe-lifecycles does not work to alleviate this error.

phamhuuan commented 4 years ago

Open node_modules/react-native-swiper/src/index.js and node_modules/react-native-swiper/dist/index.js then edit componentWillMount --> UNSAFE_componentWillMount and componentWillReceiveProps --> UNSAFE_componentWillReceiveProps