React Native Warning处理
While using the life-cycle methods in react-native, I have encountered the following warning messages in the console as well as in the emulator:
Warning: componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.
Warning: componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount.
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', ]);
浙公网安备 33010602011771号