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

8 lines
155 B
Plaintext
Raw Normal View History

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-07 14:13:35 +01:00
}
}