react-snap-carousel
react-snap-carousel copied to clipboard
Infinite scroll
Thanks a lot for the library, it's really great.
Is there any chance you have an example of someone using it to implement an infinite scroll? Right now I'm navigating back to the start, which works, but makes it obvious to the user that they're back at the start.
const onNext = () => {
if (activePageIndex === pages.length - 1) {
goTo(0)
} else {
next()
}
}
const onPrev = () => {
if (activePageIndex === 0) {
goTo(pages.length - 1)
} else {
prev()
}
}
Netflix is an example of an infinite carousel which doesn't look like you're going back to the start. Thanks!