clear interval on component unmount
This commit is contained in:
@@ -32,6 +32,9 @@ export default class Countdown extends Component<Props, State> {
|
||||
});
|
||||
this.start();
|
||||
}
|
||||
componentWillUnmount() {
|
||||
window.clearInterval(this.intervalID);
|
||||
}
|
||||
shouldComponentUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user