I want to know the current active item index after a scroll or after a snap. I see that onSnapToItem(index) gets called only when carousel.snapToItem(index) is done but not during scrolling ends. So which callback should I use?
Hi folks, Seems like a cosmetic bug.
Setting activeSlideOffset={2} solved my issue. Now onSnapToItem(index) gets called while scrolling as well as snapping. :)
carouselRef.current.currentIndex is a manual way to get the current index
Most helpful comment
Hi folks, Seems like a cosmetic bug.
Setting activeSlideOffset={2} solved my issue. Now
onSnapToItem(index)gets called while scrolling as well as snapping. :)