Skip to content

Wrong card rendered on Android + Flickering (Android & iOS) #147

@Tring-Priyadharshini

Description

@Tring-Priyadharshini

Description
There are two issues happening with react-native-deck-swiper:

  • Android → Wrong card is rendered after swiping
  • Android & iOS → Flickering occurs during swipe transitions (iOS flickers only, Android flickers + renders wrong card)

Behavior:

Dataset example:
Card A, Card B, Card C, Card D, Card E

Expected behavior:

  • Swipe A → B should appear
  • Swipe B → C
  • … continues sequentially

Actual behavior:
Android:

  • While swiping Card A → Card B appears temporarily (preview)
  • After completing the swipe → Card C appears instead of Card B
  • If I try to swipe the wrongly shown card (Card C) → Card B appears, which is incorrect
  • Internal index from onSwiped is always correct, UI is one card ahead
  • Flickering occurs during card transitions

iOS:

  • Correct card order is shown
  • But flickering still happens during swipe transitions

📌 Key Findings

  • onSwiped callback always reports the correct next index
  • UI rendering gets out of sync only on Android, always +1 card ahead
  • Flickering occurs on both platforms (Android + iOS)
  • Issue makes the swiper unreliable on Android for sequential card flows

🧪 Environment

React Native: 0.82:1
react-native-deck-swiper: ^2.0.18
Android: OnePlus, Samsung, Oppo
iOS: Stable but flickers

🔧 Tried (No improvement)

  • Tried removing the explicitly passed cardIndex to let the swiper handle it internally, but there was no improvement.
  • Changing stackSize as 3(even tried with 2), stackSeparation as 12, secondCardZoom as 0.97
  • Adding explicit keys
  • Forcing re-render
  • Wrapping card component with React.memo
  • Removing additional transforms/animations
  • No change in behavior

Questions

Could you please confirm whether this is a known issue on Android?
Is there any existing workaround for the incorrect card rendering or flickering?
If not, is it possible for this to be addressed in an upcoming patch?

I would really appreciate any suggestions, workarounds, or changes I can apply on my end to help resolve the wrong-card rendering issue on Android and reduce the flickering happening on both platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions