SOURCE

console 命令行工具 X clear

                    
>
console
class Child extends React.Component{
  render(){
    return (
      <div>
        <header>{this.props.title}</header>
        <content>{this.props.children}</content>
        <footer>{this.props.footer}</footer>
      </div>
    )
  }
}

function Parent(){
  return (
    <Child title="this is title" footer={<p style={{textAlign:'center'}}>this is footer</p>}>
     <div style={{width:'100px',height:'100px',backgroundColor:'red'}}></div>
    </Child>
  )
}

ReactDOM.render(<Parent/>,document.getElementById('app'))
<script src="https://unpkg.com/react/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script>
<div id="app"></div>