In JSX expressions that contain both an opening tag and a closing tag, the content between those tags is passed to components automatically as a special prop: props.children
.
There are a number of methods available in the React API to work with this prop
. These include:
React.Children.map
React.Children.forEach
React.Children.count
React.Children.only
React.Children.toArray