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