Skip to content

Instantly share code, notes, and snippets.

@alexandrzavalii
Last active March 30, 2019 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandrzavalii/bf23fbbbcb5755a42baf2df51b09146a to your computer and use it in GitHub Desktop.
Save alexandrzavalii/bf23fbbbcb5755a42baf2df51b09146a to your computer and use it in GitHub Desktop.
// DumboParent.js
return (
<Dumbo
availableShoes={availableShoes}
firstChild={clothing => <FirstChild clothing={clothing} lollipops={this.state.lollipops} />}
secondChild={clothing => <SecondChild clothing={clothing} />}
/>
)
// Dumbo.js
return (
<div>
{this.props.firstChild(this.state.firstChild)}
{this.props.secondChild(this.state.secondChild)}
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment