ConstReturns the only child from a children collection.
The children to read.
The single child (or null/exception based on the number of children).
Converts component children into a flat array.
The children to convert.
An array representation of the children.
Children namespace for utilities that operate on
props.children.Childrenis deprecated and not recommended by React documentation itself. ButonlyandtoArrayare used extensively everywhere, so I included them.