Skip to content

Instantly share code, notes, and snippets.

@choonkending
Created September 4, 2016 22:12
Show Gist options
  • Save choonkending/7da9fd006df752680ad51f58440bbc40 to your computer and use it in GitHub Desktop.
Save choonkending/7da9fd006df752680ad51f58440bbc40 to your computer and use it in GitHub Desktop.
class MyComponent extends React.Component {
render() {
return (
<div>
{this.props.children('Cruisin down the street')}
</div>
);
}
}
// In the parent component
<MyComponent>
{ value => <div>{`${value} in my 64`}</div> }
</MyComponent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment