diff --git a/src/native/Svg.tsx b/src/native/Svg.tsx index b60e77ea..db7932cc 100644 --- a/src/native/Svg.tsx +++ b/src/native/Svg.tsx @@ -44,8 +44,10 @@ class NativeSvg extends Component { duration: durMs, useNativeDriver: true, }).start(() => { - this.animatedValue.setValue(-1) - this.setAnimation() + if (this.props.animate) { + this.animatedValue.setValue(-1) + this.setAnimation() + } }) } @@ -55,6 +57,12 @@ class NativeSvg extends Component { } } + componentDidUpdate(prevProps: IContentLoaderProps) { + if (!prevProps.animate && this.props.animate) { + this.setAnimation() + } + } + render() { const { children,