React.Children, as the documentation explains, is a collection of utilities for child components. In this case (jsx):
<div>
<span>Foo</span>
<span>Bar</span>
</div>
Yours div childrenwill be an array of two spans. Consider the self-closing component:
<div>
<SomeCustomElement/>
</div>
In this case, it divhas one child, but this.props.childrenin SomeCustomElementwill null. Therefore, an attempt to call this.props.children.mapin some cases will cause an error, since childrenprop does not follow a strict type convention.
React.Children . "" ( ), , , , this.props.children null, , - , if, switch , . , . , - , null, , ..