Skip to content

Commit 832edd7

Browse files
authored
Merge pull request danilowoz#155 from danilowoz/native-remove-listener
fix(native): remove listener on unmont
2 parents e12cfc5 + 9585a0f commit 832edd7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/native/Svg.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ class NativeSvg extends Component<RequiredIContentLoaderProps, State> {
6767
}
6868
}
6969

70+
componentWillUnmount = () => {
71+
if (this.props.animate) {
72+
this.animatedValue.removeAllListeners()
73+
}
74+
}
75+
7076
render() {
7177
const {
7278
children,

0 commit comments

Comments
 (0)