leecade / leecade/react-native-swiper
Current index state is not updating when a api call is happening on index call
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
current index state is not updating when a api call is happening on index call
<Swiper style={styles.wrapper}
key={Utils.randomString()}
showsButtons={true}
showsPagination={false}
onScrollBeginDrag={this.stopVideo}
onIndexChanged={this.loadMorePosts}
animated={false}
index={this.state.currIndex}
containerStyle={{flex: 1}}
loop={false}>
{this.renderSwipeView()}
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 with the Swiper usage shown in the issue, especially the index prop tied to currIndex and the onIndexChanged handler loadMorePosts. Reproduce the behavior while the API call is in progress and trace whether the current index changes as expected. Done means the index state updates correctly during the API call and the Swiper reflects it.
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
- 30/100