Skip to content

Instantly share code, notes, and snippets.

@carlosdlf
Created May 1, 2015 00:25
Show Gist options
  • Save carlosdlf/d1db7985a46886e22fd9 to your computer and use it in GitHub Desktop.
Save carlosdlf/d1db7985a46886e22fd9 to your computer and use it in GitHub Desktop.
React Children
/**
* Created by clarico on 30/04/2015.
*/
var App = React.createClass({
render:function(){
return <Button>I <Heart/> React</Button>
}
});
var Button = React.createClass({
render:function(){
return <button>{this.props.children}</button>
}
});
var Heart = React.createClass({
render:function(){
return <span className="glyphicon glyphicon-heart"></span>
}
});
React.render(<App/>, document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment