React Native问题: componentWillReceiveProps is deprecated
Warning: componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.
处理:
From https://stackoverflow.com/questions/49258598/react-native-lifecycle-methods-warning-componentwillreceiveprops-is-deprecate
I think it does not affect your application, it's just annoying.
Hide it by add below into index.js
:
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings([
'Warning: componentWillMount is deprecated',
'Warning: componentWillReceiveProps is deprecated',
'Module RCTImageLoader requires',
]);