Closed Yoshi20 closed 4 years ago
componentDidMount() -> timer starten analog:
intervalID = 0;
pollVariable = () => { this.intervalID = setTimeout(() => { if (this.props.isActive) { this.props.loadVariable(this.props.variableName); this.pollVariable(); } }, 1000); };
componentWillUnmount() { clearInterval(this.intervalID); }
componentDidMount() -> timer starten analog:
intervalID = 0;
pollVariable = () => { this.intervalID = setTimeout(() => { if (this.props.isActive) { this.props.loadVariable(this.props.variableName); this.pollVariable(); } }, 1000); };
componentWillUnmount() { clearInterval(this.intervalID); }