clear interval on component unmount

This commit is contained in:
Vyrtsev Mikhail
2019-07-29 13:47:35 -05:00
committed by Umputun
parent 8d748b6c65
commit 49a16f9071
@@ -32,6 +32,9 @@ export default class Countdown extends Component<Props, State> {
});
this.start();
}
componentWillUnmount() {
window.clearInterval(this.intervalID);
}
shouldComponentUpdate() {
return false;
}