leecade / leecade/react-native-swiper

weird glitch when using useState with another component on the same screen

Open
#1,337 2 comments 0 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

Which OS ?

developing on Windows, testing with expo on iOS

Version

Which versions are you using:

  • react-native-swiper v1.6.0-rc
  • react-native v0.64.3
Expected behaviour

when clicking a checkbox (bouncy checkbox or pressable) and updating with setState, the current page should not move slightly to the left

Actual behaviour

when clicking a checkbox (bouncy checkbox or pressable) and updating with setState, the current page moves slightly to the left as if someone started swiping it, and it stays there

How to reproduce it>

To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.

Steps to reproduce
  1. have slider component as a part of the page
  2. add in some kind of button that updates the state
  3. see how the 2nd page or higher shifts slightly left

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

Start by modifying an example in the examples folder to reproduce the issue with a swiper page, a checkbox or pressable, and setState on React Native 0.64.3 with react-native-swiper v1.6.0-rc. Done means updating state leaves the current page stationary instead of shifting left.

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.