leecade / leecade/react-native-swiper
Long load time for many children.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
If I make a simple implementation like so:
const CustomComponent = (props) => (
<View style={{ alignItems: 'center', justifyContent: 'center', flex: 1 }}>
<Text>{props.item}</Text>
</View>
)
const data = [...new Array(2000)].map((x, i) => `Item ${i}`)
export class Simple extends React.Component<PropsT> {
render() {
return (
<Swiper>
{data.map(x => (
<CustomComponent item={x} />
))}
</Swiper>
)
}
}
As soon as I try to render Simple the app chokes, presumably while trying to instantiate 2000 instances of CustomComponent.
Am I using the library incorrectly? This seems like a crucial performance issue.
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 reproducing the provided Simple example with 2,000 children in the React Native Swiper entry point. Trace how Swiper processes the mapped CustomComponent instances, then verify the reported long load time is addressed without changing the example's intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100