react-native-swiper
react-native-swiper copied to clipboard
ScrollBy method undefined
Hello! I am trying to use react-native-swiper on my project. I had my own custom buttons. So when I click on a button, it calls the scrollBy function. But it's not working.
This is what I coded :

This is the error I get :

How I can solve this ? Thanks.
Which OS ?
Android
Version
Which versions are you using:
- react-native-swiper v1.5.14
- react-native v0.59
ref.current.scrollBy
try using this.refs.swiper.scrollBy(n) in your case refs.swiper.scrollBy(n)
ref.current.scrollBy
This works, the issue can be closed