Created
April 8, 2016 13:34
-
-
Save fab1an/2090e3a0e7208c7ff3acb781d0160c86 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
class App extends React.Component { | |
static makeProps($) { | |
return { | |
box1: $.box1, | |
box2: $.box2, | |
otherData: $.otherData || "Default Value" | |
} | |
} | |
render() { | |
const $ = this.props | |
return ( | |
<div> | |
<Box {...$.box1} /> | |
<Box {...$.box2} /> | |
<OtherComp {...$.otherData} | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment