mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
28 lines
688 B
React
28 lines
688 B
React
|
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;
|