Open arunabhverma opened 3 years ago
<ParallaxSwiper speed={0.5} animatedValue={myCustomAnimatedValue} dividerWidth={8} dividerColor="black" backgroundColor="black" vertical onMomentumScrollEnd={activePageIndex => setState((prev) => ({ ...prev, index: activePageIndex }))} showProgressBar={true} progressBarBackgroundColor="rgba(0,0,0,0.25)" progressBarValueBackgroundColor="white"
error is :
without onMomentumScrollEnd or with onMomentumScrollEnd={activePageIndex => console.log(activePageIndex)} it working fine.
but I want to setState index of page when scroll end
<ParallaxSwiper speed={0.5} animatedValue={myCustomAnimatedValue} dividerWidth={8} dividerColor="black" backgroundColor="black" vertical onMomentumScrollEnd={activePageIndex => setState((prev) => ({ ...prev, index: activePageIndex }))} showProgressBar={true} progressBarBackgroundColor="rgba(0,0,0,0.25)" progressBarValueBackgroundColor="white"