leecade / leecade/react-native-swiper

Flickering issue still persists with the latest version 1.6.0 when loop={true}.

Open
#1,258 2 comments 7 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

Flickering issue still persists even with the latest version 1.6.0. Using the Swiper component with horizontal as false to have vertical swipes -
<Swiper ref={viewPagerRef} index={postDetailsRef?.current?.postIndex} horizontal={false} showsPagination={false} scrollEventThrottle={16} bounces={true} loop removeClippedSubviews onMomentumScrollBegin={(event) => { if (optionsState.isImageLoadError) { setImageLoadError(optionsState, setOptionsState, false); } postDetailsRef?.current?.setPostAnimationVisible(true); }} onMomentumScrollEnd={(event) => onSwiperScrollEnd(event, postDetailsRef, textPostDescriptionAnimationValue_translate_x, textPostTypeAnimationValue_translate_x)} onScroll={(event) => { resetAnimatePostTextDetails(textPostDescriptionAnimationValue_translate_x, textPostTypeAnimationValue_translate_x); //onPostScrollFunction(event); }} />

  1. Whenloop={true}this flickerring occurs on the first and the last view.
  2. Adding removeClippedSubviews={false} does not fix the issue as our project uses FastImage that caches the images -
    <FastImage style={[{ width: width, height: height }]} source={{ uri: item.postImage, priority: FastImage.priority.high, cache: FastImage.cacheControl.immutable }} fallback={optionsState.isImageLoadError} onLoadEnd={() => scrollWhenPostIdFromNotification(sdomDatastate, postIdFromNotification, viewPagerRef, postDetailsRef)} onError={() => setImageLoadError(optionsState, setOptionsState, true)} />
  3. react-native-snap-carousal also has similar issue when implemented with vertical option enabled.

Please suggest a solution as this is very important to us.Should we proceed with custom impl? If so any links or videos present?

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

Start by reproducing the issue with the provided Swiper configuration: vertical mode, loop enabled, and the first and last views; compare behavior with removeClippedSubviews={false}. Review the Swiper component's loop handling and the mentioned FastImage integration, then compare with react-native-snap-carousel's vertical behavior. Done means the first and last views no longer flicker in this setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.