From 49a16f9071ed3e4cf95dcc99a03832dc41c0fc90 Mon Sep 17 00:00:00 2001 From: Vyrtsev Mikhail Date: Mon, 8 Jul 2019 00:25:31 +0300 Subject: [PATCH] clear interval on component unmount --- frontend/app/components/countdown/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/app/components/countdown/index.tsx b/frontend/app/components/countdown/index.tsx index be17bda9..518f385f 100644 --- a/frontend/app/components/countdown/index.tsx +++ b/frontend/app/components/countdown/index.tsx @@ -32,6 +32,9 @@ export default class Countdown extends Component { }); this.start(); } + componentWillUnmount() { + window.clearInterval(this.intervalID); + } shouldComponentUpdate() { return false; }