React-native: how to disable YellowBox (enabled in iOS by default)

Created on 16 Dec 2015  Â·  9Comments  Â·  Source: facebook/react-native

i choose release mode in Xcode ,why my app still has the yellow box?

Locked

Most helpful comment

console.disableYellowBox = true;
@MrPluto

All 9 comments

Hey MrPluto, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

console.disableYellowBox = true;
@MrPluto

Thanks a lot. :+1:

Sorry, where do you add console.disableYellowBox = true; ?

@michelarteta you can put in in your top most component to disable it for the entire app

@krsjoseph Can I re-enable it after disabling it for a while?

Yes you can just delete or comment out the line of code.

On Sun, Jul 30, 2017, 12:35 Jeungmin Oh notifications@github.com wrote:

@krsjoseph https://github.com/krsjoseph Can I re-enable it after
disabling it for a while?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/4819#issuecomment-318913116,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA-P3db8-9DfFgZHurfUXNz4L6noBra8ks5sTLDWgaJpZM4G2dtG
.

@krsjoseph Thanks for your answer. I'll try :)

Just in case someone finds their way here:

Ignore YellowBox warnings with YellowBox.ignoreWarnings([...]) rather than console.ignoredYellowBox = [...]

Since RN 0.52.0

Was this page helpful?
0 / 5 - 0 ratings