'react-native-animatable' dependency is obsolete and throwing warnings
See original GitHub issueEnvironment
System: OS: Windows 10 CPU: (12) x64 Intel® Core™ i7-8700 CPU @ 3.20GHz Memory: 4.39 GB / 15.94 GB Binaries: Node: 12.7.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.19.0 - C:\Users\David\AppData\Roaming\npm\yarn.CMD npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD SDKs: Android SDK: API Levels: 28, 29 Build Tools: 28.0.3, 29.0.2 System Images: android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64 IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5791312
Platforms
Probably both
Versions
- Android: 10
- react-native-modal: 11.4.0
- react-native: 0.61.1
- react: 16.9.0
Description
Related to: https://github.com/oblador/react-native-animatable/issues/278
WARN Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks 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://fb.me/react-derived-state
- Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to th
eir new names, you can run
npx react-codemod rename-unsafe-lifecycles
in your project source folder. Please update the following components: withAnimatable(Component)
But seems react-native-animatable
is dead so someone needs to change it in this repo for replacement.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Thanks for reporting! We have a couple of other issues related to it but that’s fine.
There’s no plan for removing it. I think moving to a fork of
react-native-animatable
with the fixes might be the easiest option for now… Also, we’re open to PRs!I’ve just rebuilt our app from scratch (i.e. clear all caches and build folders) with the updated
react-native-modal
dependency and all the modal-related warnings seem to be gone. Thepackage-lock.json
shows the newreact-native-animatable
version too.So it looks good on my side 👍