如何隐藏或抑制反应原生警告 [英] How do I hide or suppress react-native warning

查看:57
本文介绍了如何隐藏或抑制反应原生警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 react-native 中收到以下警告,我被告知可以忽略,但实际警告很烦人.

I am getting the following warning in my react-native which I am told is something that I can ignore, but the actual warning is annoying.

错误的实际文本如下...

The actual text of the error is the following...

警告:道具类型失败:SceneView 中未指定必需道具 sceneRendererProps.isRequired.检查NavigationCard的render方法.

Warning: Failed propType: Required prop sceneRendererProps.isRequired was not specified in SceneView. Check the render method of NavigationCard.

有什么方法可以消除或专门抑制此错误消息?

Is there a way I can get rid of, or suppress this error message specifically?

推荐答案

根据 这篇文章

您应该能够执行以下操作...

You should be able to do the following...

console.ignoredYellowBox = ['Warning: Failed propType: SceneView'];

这篇关于如何隐藏或抑制反应原生警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆