meliorence / meliorence/react-native-image-gallery
Laggy when using setParams react navigation on page selected
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 717
- Forks
- 298
- PR merge metrics
- No merged PRs in 30d
Description
Device: iOS
This code below cause laggy animation on scroll and blocking gesture
onChangeImage = (index) => {
this.setState({ index });
this.props.navigation.setParams({index: index+1})
}
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
Reproduce the lag on iOS using the onChangeImage handler shown in the issue, focusing on the interaction between setState and navigation.setParams. Trace the gallery's page-selection and navigation update entry points; done means scrolling and gesture animation remain responsive while the selected index is updated.
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
- Needs clarification
- Newbie friendliness
- 35/100