react-native-animatable
react-native-animatable copied to clipboard
fix: replaces UNSAFE_componentWillReceiveProps with componentDidUpdate
The use of UNSAFE_componentWillReceiveProps is throwing an error with new versions of react-native.
ERROR Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
Here is a PR with a fix based on the recommendations in the error message to solve it. I'm not 100% confident on this fix (I'm a beginner in the react ecosystem), so feel free to give me some suggestions.
Please merge this