Closed webraptor closed 7 years ago
I am not sure if I get your issue, but here is how to achieve lazy loading : https://github.com/alexbrillant/react-native-deck-swiper/issues/7
What do you mean by updating swiper cards ? What kind of update ? What are you trying to do ? Perhaps, should I add a componentWillReceiveProps to update card indexes ? And, if so, what kind of behavior would you expect to happen ? @webraptor
@alexbrillant yeap, more or less I am trying to achieve what you're referring to with componentWillReceiveProps. The issue was that cards payload gets updated externally form the swiper component, and if user has already swiped some cards the indexes get messed up if all cards are different (IE: original cards different than newly received ones, think of it as a complete change in a search). I'm already working on it, will be creating a PR within the next day...
With lazy loading it's another thing, since the cards are just pushed to the end of the stack and everything works smoothly.
fixed in 1.3.3 !
Updating Swiper cards sent as argument doesn't trigger cardIndex reset and neither does it trigger rendering of Swiper component. Steps to reproduce:
Possible fixes