meliorence / meliorence/react-native-snap-carousel
Carousel refresh when snapToPrev() or scroll back
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Not sure it this an issue.
When i load 20 items, and use snapToPrev() or scroll back to last item.
code as below
<Carousel
ref={(c) => { this._foodcarousel = c; }}
layout={'default'}
sliderWidth={sliderWidth}
itemWidth={itemWidth}
data = {this.state.food_dataSource}
renderItem={this._renderCarouselItem}
loop={true}
autoplay={true}
autoplayInterval={5000}
/>
let say the item is sort like
[19],[20],[1],[2],[3]
[1]: main view
At here i use snapToPrev() or scroll back to [20], and suddenly whole carousel item is being refresh. Are we able to avoid this from refresh. I think it is not necessary to refresh.
"react": "16.9.0",
"react-native": "^0.60.5",
"react-native-snap-carousel": "^3.9.0",
Contributor guide
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 behavior with the supplied Carousel configuration, 20 items, loop enabled, and snapToPrev() or backward scrolling to item 20. Compare the carousel's refresh behavior when moving from item 1 back to item 20; done means returning to the previous item without refreshing the whole carousel.
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