xamous / react-native-smooth-pincode-input

A cross-platform, smooth, lightweight, customizable PIN code input component for React Native.
MIT License
406 stars 138 forks source link

Warning: componentWillReceiveProps is deprecated #39

Open VasquezSRE opened 5 years ago

VasquezSRE commented 5 years ago

Hello,

I am using the component and I got a warning when using a decrepit component.

My installation has the following versions of react

"react": "16.8.6", "react-native": "0.60.4", "react-native-animatable": "^1.3.2",

And the message is as follows

ReactNativeJS ▶︎ Warning: componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead. │ │ Please update the following components: withAnimatable(View) │ │ Learn more about this warning here: └ https://fb.me/react-async-component-lifecycle-hooks

rodrigowpl commented 5 years ago

same here

rodw1995 commented 4 years ago

I had the same issue and eventually rewrote the library. Maybe this is also a solution for others, see https://github.com/rodw1995/react-native-pincode-input-component

retyui commented 4 years ago

@VasquezLab

Thanks for reporting and you can also use better implementation with better maintainability: https://github.com/retyui/react-native-confirmation-code-field

react-native-confirmation-code-field animated example react-native-confirmation-code-field mask example react-native-confirmation-code-field underline example react-native-confirmation-code-field basic example