1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/public/js/components/strategy/StrategyComponent.jsx

28 lines
688 B
JavaScript

var React = require('react'),
strategyStore = require('../../stores/StrategyStore');
var StrategyComponent = React.createClass({
getInitialState: function() {
return {
createView: false,
strategies: []
};
},
componentDidMount: function () {
strategyStore.getStrategies().then(function(res) {
this.setState({strategies: res.strategies});
}.bind(this));
},
render: function() {
return (
<div>
<h1>Strategies</h1>
{JSON.stringify(this.state.strategies)}
</div>
);
}
});
module.exports = StrategyComponent;