Children
function Grid(props) {
return <div>{props.children}</div>;
}<Grid>
<Row />
<Row />
<Row />
</Grid>Extra
<Fetch url="api.myself.com">
{(result) => <p>{result}</p>}
</Fetch>To Change Children
renderChildren() {
return React.Children.map(this.props.children, child => {
return React.cloneElement(child, {
name: this.props.name
})
})
}Helpers
Last updated