Skip to content

Instantly share code, notes, and snippets.

@fab1an
Created April 8, 2016 13:34
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 fab1an/2090e3a0e7208c7ff3acb781d0160c86 to your computer and use it in GitHub Desktop.
Save fab1an/2090e3a0e7208c7ff3acb781d0160c86 to your computer and use it in GitHub Desktop.
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