meliorence / meliorence/react-native-snap-carousel
How to reset the active index (this._activeIndex) to 0
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
I want to reset the active index when the carousel component is not unmounted but new data is passed to the component.
I am using this carousel for a color selection swatch where when I change the color, I want to reset the active index. How can I do that?
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 tracing how the carousel handles incoming data and stores this._activeIndex; the issue names no files or tests. Determine whether the existing component API supports resetting the index without unmounting, and consider the work complete when a data update reliably returns the active index to 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100