react-native-deck-swiper icon indicating copy to clipboard operation
react-native-deck-swiper copied to clipboard

How to update cards

Open samadRopstam opened this issue 11 months ago • 2 comments

I have a scenario in which once all the cards are swiped api is called to increase the radius and get more cards. the array is updated and i can see new cards in the log but the render functions returns undefined and the cards are empty i have also tried swipRef?.current?.forceUpdate(); but thats doesn't work either. The only way to render these new cards is to reopen that screen and we are able to see the cards. Can some one please guide?

samadRopstam avatar Feb 26 '24 06:02 samadRopstam

i have the same issue

coyksdev avatar Mar 20 '24 08:03 coyksdev

@coyksdev i found the solution for it you have to give key e.g key={cardsArray.length} and then you also have to call the api to get more users with onSwipedAll={getUsers}

samadRopstam avatar Mar 20 '24 09:03 samadRopstam