var React = require('react'); var Strategy = React.createClass({ propTypes: { strategy: React.PropTypes.object.isRequired }, onRemove: function(event) { event.preventDefault(); if (window.confirm("Are you sure you want to delete strategy '"+ this.props.strategy.name+"'?")) { this.props.onRemove(this.props.strategy); } }, render: function() { return (
{this.props.strategy.name} (remove)
{this.props.strategy.description}
); } }); module.exports = Strategy;