leecade / leecade/react-native-swiper
Bug during display dynamic data with static slides
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 ?
Both (Android & iOS)
Version
Which versions are you using:
- react-native-swiper v1.5.14
- react-native v0.60.5
Expected behaviour
All declared slides (static and dynamic) should display per one screen
Actual behaviour
If we declare slides and add dynamic data (with .map()) then all dynamic data are loaded on one slide :(
How to reproduce it>
<Swiper showsButtons>
<View style={styles.slide1}>
<Text style={styles.text}>Look at next!!?!</Text>
</View>
{this.state.items.map((item, key) => {
return (
<View key={key} style={item.css}>
<Text style={styles.text}>{item.title}</Text>
</View>
)
})}
<View style={styles.slide1}>
<Text style={styles.text}>What happened there?</Text>
</View>
</Swiper>

Please look at that demo: https://snack.expo.io/@donwasyl/swipe---slide-bug
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 running the linked Expo Snack reproduction with react-native-swiper v1.5.14 and compare the static slides with the slides produced by items.map(). Trace how the Swiper handles these children; done means each static and dynamic item renders as a separate slide on both Android and iOS.
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
- Mostly clear
- Newbie friendliness
- 45/100