i6mi6 / react-native-parallax-scroll-view

A ScrollView-like component with parallax and sticky header support.
ISC License
2.31k stars 379 forks source link

TypeError: undefined is not an object (evaluating 'this.refs[SCROLLVIEW_REF]._component.getScrollResponder') #151

Open shivanshrajpoot opened 3 years ago

shivanshrajpoot commented 3 years ago

Env: RN : 0.63^

Problem: When trying to use scrollTo function using ref, throws following error TypeError: undefined is not an object (evaluating 'this.refs[SCROLLVIEW_REF]._component.getScrollResponder')

Reason: getScrollResponder() { return this.refs[SCROLLVIEW_REF]._component.getScrollResponder() } Above function uses _component to access the ref which is not there, hence throwing the error.

jeffreyvanhees commented 3 years ago

Fixed in https://github.com/i6mi6/react-native-parallax-scroll-view/pull/150, but it looks like the maintainer isn't checking it's pull requests anymore.