去掉运行程序之后的黄色warning:
在项目的index.js文件中加入以下代码:
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings([
'Warning: componentWillMount is deprecated',
'Warning: componentWillReceiveProps is deprecated',
'Module RCTImageLoader requires',
'Warning: componentWillUpdate is deprecated',
]);