react-native:去掉运行程序之后的黄色warning

去掉运行程序之后的黄色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',
]);


版权声明:本文为LiHong333原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。