var React = require('react'); var TextInput = require('../form/TextInput'); var strategyStore = require('../../stores/StrategyStore'); var FeatureForm = React.createClass({ getInitialState: function() { return {strategyOptions: []}; }, componentWillMount: function() { strategyStore.getStrategies().then(this.handleStrategyResponse); }, handleStrategyResponse: function(response) { var strategyNames = response.strategies.map(function(s) { return s.name; }); this.setState({strategyOptions: strategyNames}); }, render: function() { var feature = this.props.feature || { name: '', strategy: 'default', enabled: false }; var title = this.props.feature ? "" : "Create new toggle"; return (