'use strict'; const React = require('react'); const StrategyList = require('./StrategyList'); const StrategyForm = require('./StrategyForm'); const StrategyActions = require('../../stores/StrategyActions'); const StrategiesComponent = React.createClass({ getInitialState() { return { createView: false, }; }, onNewStrategy() { this.setState({ createView: true }); }, onCancelNewStrategy() { this.setState({ createView: false }); }, onSave(strategy) { StrategyActions.create.triggerPromise(strategy) .then(this.onCancelNewStrategy); }, onRemove(strategy) { StrategyActions.remove.triggerPromise(strategy); }, render() { return (