var React = require('react'); var FeatureForm = require('./FeatureForm'); var Feature = React.createClass({ getInitialState: function() { return { editMode: false }; }, toggleEditMode: function() { this.setState({editMode: !this.state.editMode}); }, saveFeature: function(feature) { this.props.onChange({ name: feature.name, field: 'enabled', value: feature.enabled }); this.toggleEditMode(); }, render: function() { return (