Open bruteforks opened 1 year ago
Having a related issue with rendering - SwipeRight renders correctly, then replaces with the next index. Only happens when parsing through index to my handle function (using redux :
<SafeAreaView style={styles.container}>
<Swiper
cards={CardData}
renderCard={Card}
infinite // repeat prop
backgroundColor="white"
cardHorizontalMargin={0}
stackSize={2} // bg cards
onSwipedRight={(index) => handleSwipeRight(index)}
/>
</SafeAreaView>
const handleSwipeRight = (index: number) => {
// if exists as data, and if not already added.
if (props.items.possible?.[index]) {
props.addItem(index);
}
}
So I'm trying to swipe backwards and want to see the previous card during the swipe animation, but instead it shows card 4, then after the animation finishes it shows the correct card. I think there are similar issues but no one's posted enough information about it. Let me know if you have any ideas. Thanks