leecade / leecade/react-native-swiper
onIndexChanged is triggered later on 1.6.0. ( 1.5.14 is faster significiantly)
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 ?
Version
Which versions are you using:
- react-native-swiper 1.6.0
- react-native-swiper 1.5.14
- react-native v0.59.10
Expected behaviour
I'm expecting the v1.6.0 swiper responses as quick as older versions.
Actual behaviour
onIndexChanged method of component responses slow on v1.6.0
How to reproduce it>
<SwiperButton text={strings.saved.projects} active={activeIndex === 0} _onPress={() => { this._handleSwipe(-1) }} />
<SwiperButton text={strings.saved.courses} active={activeIndex === 1} _onPress={() => { this._handleSwipe(1) }} />
<Swiper ref={(ref) => { this.swiper = ref }} loop={false} showsPagination={false} onIndexChanged={(index) => { this.setState({ index: index }) }}></Swiper>
This is how I use with some a few views in in it.
I have two buttons and their style changes according to the active index. In company we have a app that uses v1.5.14 swiper and its response time is great. But for new app we are developing, we had installed v.1.6.0. At first I thought is response time is normal, but when I compare it to older version, I saw that newer version maybe responses about 300-400ms late.
Steps to reproduce
1.Install v1.5.14 and get the response when onIndexChanged triggered
2.Install v1.6.0 and get the response when onIndexChanged triggered
3.Compare the times
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the comparison between react-native-swiper 1.5.14 and 1.6.0 using the reported Swiper configuration and timing when onIndexChanged fires. Compare the two versions' index-change behavior and determine whether the reported 300–400 ms delay is reproducible. Done means the callback responds as promptly in 1.6.0 as in 1.5.14, with the behavior verified using the reproduction steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100