Skip to content

Instantly share code, notes, and snippets.

@davepoon
Created May 23, 2016 04:58
Show Gist options
  • Save davepoon/4036310e3dd7273d5ca4706ef1298946 to your computer and use it in GitHub Desktop.
Save davepoon/4036310e3dd7273d5ca4706ef1298946 to your computer and use it in GitHub Desktop.
Pass props to {this.props.children}
// instead of this.props.children, we use the following syntax to pass props to children components
{React.cloneElement(this.props.children, this.props)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment