alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
1.55k stars 461 forks source link

Iterating over same Card Indices even though item no longer present in Card Array #301

Open arnavc1712 opened 4 years ago

arnavc1712 commented 4 years ago

Hi, My cards array is initialized to [1,2,3,4,5]. Now if I remove item '3' from the array and do setState({cards:[1,2,3,5]}), the Swiper will not consider index 3 to be item '5', but instead I get an item which is 'undefined'.

Can someone please help out?

mylesmmurphy commented 4 years ago

Do you have your Swiper's props set to your cards state?