Last active
March 30, 2019 13:35
-
-
Save alexandrzavalii/bf23fbbbcb5755a42baf2df51b09146a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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