Skip to content

Instantly share code, notes, and snippets.

@josephsavona
Created February 28, 2015 19:09
Show Gist options
  • Save josephsavona/4e6b7e657e3f09bae076 to your computer and use it in GitHub Desktop.
Save josephsavona/4e6b7e657e3f09bae076 to your computer and use it in GitHub Desktop.
React Container Classes
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