Skip to content

Commit da283ec

Browse files
yuyokkgaearon
authored andcommitted
Update reference-react.md (reactjs#276)
Hi guys, I was reading docs on `React.Children.only()` method and saw this statement `Otherwise this method throws.` and it seemed a bit unclear for me what it supposed to throw. Please let me know if this PR makes sense. Thank you!
1 parent 79288e2 commit da283ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/reference-react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Returns the total number of components in `children`, equal to the number of tim
175175
React.Children.only(children)
176176
```
177177

178-
Verifies that `children` has only one child (a React element) and returns it. Otherwise this method throws.
178+
Verifies that `children` has only one child (a React element) and returns it. Otherwise this method throws an error.
179179

180180
> Note:
181181
>

0 commit comments

Comments
 (0)