Created
February 28, 2015 19:09
-
-
Save josephsavona/4e6b7e657e3f09bae076 to your computer and use it in GitHub Desktop.
React Container Classes
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 MyComponent extends React.Component { | |
render() { | |
return ( | |
<div className="user-profile"> | |
<img src={this.props.user.thumbnail} /> | |
<h1>{this.props.user.name}</h1> | |
</div> | |
); | |
} | |
} | |
module.exports = ContainerComponent.create(MyComponent, { | |
containerFunction: function() { /*...*/ } | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment