title: How to add Element between react children with Some condition?
body: <p>I need to add element between each children when some props values satisfied 
  how to do that </p>
  
  <p>"only add element if the prop value is space is true"</p>
  
  <p>now i did like this</p>
  
  <pre><code>const style={
  height:"10px"
  }
  
  
  if(this.props.space){
  style.width=30;
  }
  
  render(){
  return(
  
  {React.Children.map(children, (child, i) =&gt; {
              return (
                &lt;React.Fragment&gt;
                  &lt;span style={style}&gt;&lt;/span&gt;
                  &lt;React.Fragment&gt;{child}&lt;/React.Fragment&gt;
                &lt;/React.Fragment&gt;
  
              );
            })}
  )
  
  }
  </code></pre>