如何在 React Native 中禁用警告? [英] How to disable warning in React Native ?
本文介绍了如何在 React Native 中禁用警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道警告很重要.但出于特定原因,我不希望它们出现在屏幕上.如何禁用那些出现在 screen
I know warnings are important. But I don't want them on screen for the specific reason. How to disable those yellow colored warnings appearing on screen
推荐答案
建议注意,这不会出现在发布版本中...但如果你想删除警告,你可以设置 console.disableYellowBox = true
Its advisable to note that this won't show up on a release build...but if you want to remove the warnings, you can set console.disableYellowBox = true
文档中的更多信息:
https://facebook.github.io/react-native/docs/debugging.html#warnings
这篇关于如何在 React Native 中禁用警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文