Commit dd1c5ddf authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

periodically refresh simulator states

parent 9efdd2f1
......@@ -89,6 +89,20 @@ class Simulators extends Component {
type: 'simulators/start-load',
token: this.state.sessionToken
});
// Start timer for periodic refresh
this.timer = window.setInterval(() => this.refresh(), 1000);
}
componentWillUnmount() {
window.clearInterval(this.timer);
}
refresh() {
AppDispatcher.dispatch({
type: 'simulators/start-load',
token: this.state.sessionToken
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment