Document how to disable YellowBox

Summary:As mentioned in #7121 by javache, this can already be disabled. Might be useful if users upgrade to 0.25 and want to hide warnings about wrong React imported (something they can't really control until community upgrades).

This should be mentioned in the release notes once it's merged.
Closes https://github.com/facebook/react-native/pull/7140

Differential Revision: D3212212

fb-gh-sync-id: 7a7afa2b7925e16d6ebfd20f4fe26d1cb9d603e5
fbshipit-source-id: 7a7afa2b7925e16d6ebfd20f4fe26d1cb9d603e5
This commit is contained in:
Mike Grabowski 2016-04-22 04:12:09 -07:00 коммит произвёл Facebook Github Bot 3
Родитель fcac6e081d
Коммит a963f91021
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -31,7 +31,16 @@ Using `console.warn` will display an on-screen log on a yellow background. Click
You can use `console.error` to display a full screen error on a red background.
These boxes only appear when you're running your app in dev mode.
By default, the warning box is enabled in `__DEV__`. Set the following flag to disable it:
```js
console.disableYellowBox = true;
console.warn('YellowBox is disabled.');
```
Specific warnings can be ignored programmatically by setting the array:
```js
console.ignoredYellowBox = ['Warning: ...'];
```
Strings in `console.ignoredYellowBox` can be a prefix of the warning that should be ignored.
### Chrome Developer Tools
To debug the JavaScript code in Chrome, select `Debug JS Remotely` from the developer menu. This will open a new tab at [http://localhost:8081/debugger-ui](http://localhost:8081/debugger-ui).