Skip to content

Commit 0cbaf83

Browse files
authored
revise documentation for YellowBox API (#583)
1 parent e031f59 commit 0cbaf83

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

reason-react-native/src/apis/YellowBox.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
---
22
id: apis/YellowBox
33
title: YellowBox
4-
wip: true
4+
officialDoc: https://facebook.github.io/react-native/docs/debugging#warnings
55
---
66

7-
```reason
8-
[@bs.module "react-native"] [@bs.scope "YellowBox"]
9-
external ignoreWarnings: array(string) => unit = "";
7+
Warning messages are displayed in white on a yellow background; which is known
8+
as a YellowBox. Warnings may be trigged with the `Js.Console.warn` function included
9+
in BuckleScript.
10+
11+
## Methods
12+
13+
### `ignoreWarnings`
1014

15+
Allows setting an array of prefixes to be ignored; any warning message which
16+
begins with a string in that array will not be displayed in the YellowBox.
17+
18+
```reason
19+
ignoreWarnings: array(string) => unit
1120
```
1221

1322
## Example

0 commit comments

Comments
 (0)