如何隐藏或抑制反应原生警告 [英] How do I hide or suppress react-native warning
问题描述
我在 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 inSceneView
. Check the render method ofNavigationCard
.
有什么方法可以消除或专门抑制此错误消息?
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屋!