Open ManishAhire opened 5 years ago
You can use timer.setInterval from react-native-timer and the function "scrollToPage" here is a function I used:
autoSlide = () => {
timer.setInterval(this, "AutoSlide", () => {
const index = this.state.currentPageIndex < this.pageCount - 1 ? this.state.currentPageIndex + 1 : 0;
this.refs.pages.scrollToPage(index);
}, config.SlideDelay);
}
I'm not able to do automatic scrolling of pages. After some time I want to scroll next page automatically.
How can. I do?