halilb / react-native-textinput-effects

Text inputs with custom label and icon animations for iOS and android. Built with react native and inspired by Codrops.
MIT License
2.98k stars 291 forks source link

componentWillReceiveProps is not secure anymore #108

Closed apppro123 closed 4 years ago

apppro123 commented 4 years ago

I got a warning because of this methode "componentWillReceiveProps" in lib/BaseInput.js.

I made now a workaround with shouldComponentUpdate (i know that this is propably not the best solution):

Instead of componentWillReceiveProps(...){...}

I now use shouldComponentUpdate(newProps){... return true}

I always return true now, so it definitely updates, i'm not sure if this is needed... I hope this helps in improving your amazing library. Thanks for your work in making these effects!

If there are further questions, just write please.

rotobogdan commented 4 years ago

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

Same here

mrousavy commented 4 years ago

@apppro123 would you mind creating a pull request with your proposed solution?

halilb commented 4 years ago

This is fixed with version 0.6.1.