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

9 lines
220 B
Plaintext
Raw Normal View History

2014-12-30 10:05:27 +01:00
var <%= name %> = React.createClass({
2014-12-07 14:13:35 +01:00
getInitialState: function () {
2014-12-10 08:46:59 +01:00
return {open: false};
2014-12-07 14:13:35 +01:00
},
toggle: function() {
2014-12-10 08:46:59 +01:00
this.setState({open: !this.state.open});
2014-12-30 09:42:31 +01:00
},
render: <%= name %>RT
2014-12-30 09:42:31 +01:00
});