Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update cards #126

Open
samadRopstam opened this issue Feb 26, 2024 · 2 comments
Open

How to update cards #126

samadRopstam opened this issue Feb 26, 2024 · 2 comments

Comments

@samadRopstam
Copy link

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?

@coyksdev
Copy link

i have the same issue

@samadRopstam
Copy link
Author

@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}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants