leecade / leecade/react-native-swiper

Loosing the correct index after re-render view

Open
#632 3 comments 1 reaction 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

Which OS 11
Version

Which versions are you using:

  • react-native-swiper v1.5.13
  • react-native v0.49.3
Expected behaviour

Maintain the correct view index and switch between views correctly

Actual behaviour

The index is lost and I can't switch between views after re-render view (with setState or others). It seems that is adding new index when rendering again

Steps to reproduce
  1. Rerender view (with setState() or forceUpdate)
  2. Switch between swipe views by swipe or with scrollBy

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 react-native-swiper v1.5.13 and react-native v0.49.3 by calling setState() or forceUpdate, then switching views by swipe and scrollBy. Trace how re-rendering affects the current index; done means the correct view index is preserved and switching continues to work after re-rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.