Accepted answer

Yes, this.props.children will return an array so if you always want to load specific children, then just reference those children by index in your wrapper. Then you could just turn icons and fields into wrapper components. Here is a working jsfiddle. See how the render method of App is exactly what you want.

CreditCardForm render:

    <div className='some'>
      <div className='special'>
        <div className='nesting'>

Fields and Icons render:


App render:

        <IconBogus />
      <FieldCardNumber />
      <FieldName />


yes, you can do it with child props. Read more @docs:

And of course check out React.Children

Related Query

More Query from same tag