From 9b5e851236da7199748223011a61f3064794d040 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Tue, 8 Oct 2019 13:23:53 +0100 Subject: [PATCH] fix(native): remove listener on unmont re #16 --- src/native/Svg.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/native/Svg.tsx b/src/native/Svg.tsx index 76862dc..2ef6a6d 100644 --- a/src/native/Svg.tsx +++ b/src/native/Svg.tsx @@ -67,6 +67,12 @@ class NativeSvg extends Component { } } + componentWillUnmount = () => { + if (this.props.animate) { + this.animatedValue.removeAllListeners() + } + } + render() { const { children,