monterosalondon / react-native-parallax-scroll

Parallax scroll view for react-native
MIT License
555 stars 63 forks source link

Error in src/index.js #17

Closed vcebotari closed 6 years ago

vcebotari commented 6 years ago
if (Animated.ScrollView !== props.scrollableComponent) {
      this.ScrollableComponent = Animated.createAnimatedComponent(
        props.scrollableComponent,
      );
    }

in your render func you have .... on return, but it's defined only in a conditional function what is in contructor, it must be at least like this:

this.ScrollableComponent = Animated.createAnimatedComponent(
      Animated.ScrollView,
    );
if (Animated.ScrollView !== props.scrollableComponent) {
      this.ScrollableComponent = Animated.createAnimatedComponent(
        props.scrollableComponent,
      );
    }

or change default props key from 'scrollableComponent' to 'ScrollableComponent

z4o4z commented 6 years ago

Hi, @440459012, thanks for the issue. You right, I forgot about it. Already fixed in v1.5.3

vcebotari commented 6 years ago

cool, thanks