mirror of
https://github.com/zhigang1992/react-content-loader.git
synced 2026-03-27 22:54:39 +08:00
Merge pull request #155 from danilowoz/native-remove-listener
fix(native): remove listener on unmont
This commit is contained in:
@@ -67,6 +67,12 @@ class NativeSvg extends Component<RequiredIContentLoaderProps, State> {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount = () => {
|
||||
if (this.props.animate) {
|
||||
this.animatedValue.removeAllListeners()
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
|
||||
Reference in New Issue
Block a user