mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Update reference-react.md (#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!
This commit is contained in:
committed by
Dan Abramov
parent
79288e2959
commit
da283ec8ff
@@ -175,7 +175,7 @@ Returns the total number of components in `children`, equal to the number of tim
|
||||
React.Children.only(children)
|
||||
```
|
||||
|
||||
Verifies that `children` has only one child (a React element) and returns it. Otherwise this method throws.
|
||||
Verifies that `children` has only one child (a React element) and returns it. Otherwise this method throws an error.
|
||||
|
||||
> Note:
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user