Skip to content

Instantly share code, notes, and snippets.

@andreypopp
Created February 7, 2014 15:43
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 andreypopp/8865144 to your computer and use it in GitHub Desktop.
Save andreypopp/8865144 to your computer and use it in GitHub Desktop.
function condition(props) {
return props.if ? Array.prototype.slice.call(arguments, 1) : [];
}
var Component = React.createClass({
render: function() {
return (
<div>
<condition if={this.state.show}>
True!
</condition>
</div>
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment