leecade / leecade/react-native-swiper
loadMinimal does not work with dynamic data
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
IOS -> simulator and device iphone 7
"react-native": "0.56.0"
"react-native-swiper": "^1.5.13"
It works properly this way
return(
<Swiper loadMinimal loop={false}>
<View><Text>1</Text></View>
<View><Text>2</Text></View>
<View><Text>3</Text></View>
<View><Text>4</Text></View>
</Swiper>
)
But when it comes to dynamic data, loading after the first two slides is stuck
render () {
return (
<Swiper loadMinimal loop={false}>
{this.state.items.map((item, key) => {
return (
<View key={key} style={item.css}>
<Text style={styles.text}>{item.title}</Text>
</View>
)
})}
</Swiper>
)
}
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 at the Swiper component's loadMinimal behavior and compare its handling of the static children with children produced by this.state.items.map in render. Reproduce the issue on the stated React Native and react-native-swiper versions; done means dynamically rendered slides after the first two load and can be swiped to normally.
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
- 35/100