FullstackStation / react-native-svg-animated-linear-gradient

A wrap SVG component for animated linear gradient
MIT License
434 stars 110 forks source link

Broken w/ RN 59 (expo SDK 33) #20

Closed n-sviridenko closed 5 years ago

n-sviridenko commented 5 years ago

Prerequisites:

Current behaviour:

Simulator Screen Shot - iPhone 8 - 2019-06-22 at 18 11 45

When changing render function the following way (removing all animation logic):

render() {
      return (
        <AnimatedSvg height={this.props.height} width={this.props.width}>
          {this.props.children}
        </AnimatedSvg>
      );
}

It looks better:

Simulator Screen Shot - iPhone 8 - 2019-06-22 at 18 12 13

Updating to react-native-svg@9.5.1 didn't help. I assume, there are some incompatibilities w/ the latest RN API.

ncailleux commented 5 years ago

Hi,

I got the same problem after updating to expo 33 and react-native-svg@9.4.0 react-native-svg-animated-linear-gradient@^0.3.0 and fixed it.

With no logic as you same behaviour:

But i fixed it by changing like this the code (removing th G arround the props): Old one:

<ClipPath id="clip">
    <G rotation="50" origin="100, 50">
        {this.props.children}
    </G>
</ClipPath>

New one:

<ClipPath id="clip">
    {this.props.children}
</ClipPath>

Current view fixed:

Maybe need an update to this package @virusvn ? :p

Good day!

oqhadev commented 5 years ago

thanks @ncailleux thats work perfect for me its rotate problem

n-sviridenko commented 5 years ago

Solved in https://github.com/virusvn/react-native-svg-animated-linear-gradient/pull/19