question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cards are not being loaded into Swiper

See original GitHub issue

Thank you for this awesome library!

I am having some difficulties adding new cards to the swiper. I am using Redux for state management, and put the loaded cards directly into the swiper.

Initially the 15 loaded cards are working out fine, but when loading additional cards the internal state.cards are not being updated.

Here’s the issue reproduced in Snack: https://snack.expo.io/BJVQ81oo4. See the console log, click Add cards and start swiping. Audi and Mercedes won’t show.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickreckcommented, May 27, 2019

@migcv @shadiramadan I’ve fixed it for my use case in this branch.

I didn’t test it thoroughly, so milage may vary depending on the features you use

0reactions
migcvcommented, Jul 15, 2019

@OriginLive, basically @patrickreck added the getDerivedStateFromProps function to the component to update the state. (the commit: https://github.com/patrickreck/react-native-deck-swiper/commit/7499c942bfaadc8fff9b2788aff52b43a2ea0696)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues showing new cards after paginated data is returned ...
Issue When dynamically adding elements to the Swiper card prop, the newly added properties will not appear on the screen.
Read more >
Credit Card Swiper Troubleshooting - MINDBODY Support
This article provides tips and possible solutions when your credit card swiper isn't reading swipes, is reading them incorrectly, or isn't working at...
Read more >
Swiper JS slider external javascript file is not being loaded
I am using Thymeleaf and displaying the content of a table in a bunch of cards. I tried swiper without Thymeleaf and the...
Read more >
Swiper API
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
Read more >
Swiper—Jumping on Page Load Resolved | by Aaron K.
The original Swiper demo jumps around and flickers on page load. Ugh. For an unknown reason it was not apparent until many days...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found