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

9 lines
220 B
Plaintext

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