meteor-factory / react-native-tinder-swipe-cards

Tinder-like swipe cards for your React Native app
MIT License
1.13k stars 301 forks source link

Previous image is visible for a short moment when using image url's #121

Open rklerck opened 6 years ago

rklerck commented 6 years ago

When I use image url's instead of static images, the previous image is visible for a short moment till the next image is loaded. Especially with large images of course. How can I fix this?

daegloe commented 6 years ago

See https://github.com/meteor-factory/react-native-tinder-swipe-cards/issues/119#issuecomment-361456058

jonathanRinciari commented 6 years ago

I had a similar issue since I keep the card stack at 5, and after each swipe i remove the swiped card, and than add a new card onto the end of the array. This was causing some issues with the keys since the default way is using index. I made some changes to this library and pushed it to npm under the name react-native-swipeable-cards. One of the changes I made was adding a keyGenerator which you can pass in as a prop to specify how the keys should be generated. If your data has a unique id key than you would have the option of using that as your key.