react-templates/playground/samples/rt-if.code

11 lines
268 B
Plaintext

var <%= name %> = React.createClass({
getInitialState: function () {
return {open: false};
},
toggle: function() {
this.setState({open: !this.state.open});
},
render: function () {
return <%= name %>RT.apply(this);
}
});