meliorence / meliorence/react-native-snap-carousel

Carousel in react-native-tabview flickers on tab change

Open
#573 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/archriss/react-native-snap-carousel/blob/1aebb185036813b1104ea01fc6229b43f10f4d9c/src/carousel/Carousel.js#L187

Do we still need this code?
I am using Carousel in react-native-tab-view, and Carousel flickers on tab change.
Green pane is react-native-tab-view, and Red pane is Carousel.

ezgif com-video-to-gif

When I remove requestAnimationFrame, it works fine.

By the way, what is hideCarousel for?

Contributor guide

Open the contributing guide

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

Start at src/carousel/Carousel.js around line 187 and inspect the requestAnimationFrame logic and the hideCarousel usage. Reproduce the flicker by using Carousel inside react-native-tab-view, then compare behavior with requestAnimationFrame removed. Done means the tab change no longer flickers while the intended purpose of hideCarousel remains clear.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.