mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Its now autopolling
This commit is contained in:
parent
7e48350b83
commit
91e9141a01
@ -166,6 +166,11 @@ var FeatureList = React.createClass({
|
||||
},
|
||||
|
||||
componentDidMount: function () {
|
||||
this.loadFeaturesFromServer();
|
||||
setInterval(this.loadFeaturesFromServer, this.props.pollInterval);
|
||||
},
|
||||
|
||||
loadFeaturesFromServer: function () {
|
||||
reqwest('/features').then(this.setFeatures);
|
||||
},
|
||||
|
||||
@ -230,6 +235,6 @@ var FeatureList = React.createClass({
|
||||
});
|
||||
|
||||
React.renderComponent(
|
||||
new FeatureList(null),
|
||||
<FeatureList pollInterval={1000} />,
|
||||
document.getElementById('content')
|
||||
);
|
Loading…
Reference in New Issue
Block a user