meliorence / meliorence/react-native-image-gallery

Laggy when using setParams react navigation on page selected

Open
#132 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.