leecade / leecade/react-native-swiper
how react-native-swiper touch autoplay stop and no touch autoplay work?
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 ?
andorid only, ios touch stop and not autoplay
Version
Which versions are you using:
- react-native-swiper v1.5.14?
- react-native v0.5.8
Expected behaviour
I touch swiper but autoplay work
Actual behaviour
how react-native-swiper touch autoplay stop and no touch autoplay work?
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.
Swiper autoplay ={this.state.autoplay}
_onTouchStart=() => { // swiper 开始touch的时候停止autoplay
this.setState({// 会触发多次渲染,关闭不用
autoplay: false
}) // console.log(this.state.autoplay) }
_onTouchEnd=() => { // swiper低版本无效,依赖crn-ext高版本
this.setState({// 会触发多次渲染,关闭不用
autoplay: true
}) }
This will render many times, affecting performance.
how ?
Chinese version https://github.com/leecade/react-native-swiper/issues/952
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 in the examples folder and inspect the Swiper usage shown in the report, including the autoplay prop and _onTouchStart/_onTouchEnd handlers. Reproduce the Android behavior with react-native-swiper v1.5.14 and React Native v0.5.8, then verify the expected touch and autoplay behavior without the reported repeated 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
- 25/100