You can use this.props.children
to render whatever children the component contains:(您可以使用this.props.children
来呈现组件包含的this.props.children
:)
const Wrap = props => <div>{props.children}</div>
export default () => <Wrap><h1>Hello word</h1></Wrap>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…