Skip to content

Instantly share code, notes, and snippets.

@petehunt
Created October 2, 2013 06:23
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 petehunt/6789788 to your computer and use it in GitHub Desktop.
Save petehunt/6789788 to your computer and use it in GitHub Desktop.
// component with layout
var Link = React.createClass({
mixins: [LayoutMixin]
render: function () {
<span>
{this.props.children[0]}
{this.transferPropsTo(<a>{this.props.children[1]}</a>)}
{this.props.children[2]}
</span>
}
});
// component usage
<Link><Icon />My awesome link<span>!</span></Link>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment