leecade / leecade/react-native-swiper

Every time the swiper re-renders the image changes to the last one but index remains 0

Open
#906 18 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

MacOS
Version

Which versions are you using:

  • react-native-swiper v1.5.14
  • react-native v0.57.7
Expected behaviour

expected image to be the first one since the dot is

Actual behaviour

when i re-render the swiper by switching navigation pages the dot remains correct in the first slide but the image appears to be the last one, if i disable loop, the problem doesn't happen, but i need looping, please fix this

How to reproduce it>
  • create a list of elements with swipers, use react navigation to switch page and return to the list again for the component to re-render, the image will switch to the last one but index and dot are still 0

Please fix this, try forcing the image or something, i need looping

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a list of swipers, React Navigation page switching, and looping enabled, then observe the image and index after returning to the list. Compare the looping and non-looping behavior; done means returning to the page keeps the image aligned with index and dot 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.