leecade / react-native-swiper

The best Swiper component for React Native.
MIT License
10.37k stars 2.35k forks source link

Swiper is Re-Rendering after loop is completed #1287

Open vishnuc opened 3 years ago

vishnuc commented 3 years ago

Which OS ?

Android

Version

Which versions are you using:

Expected behaviour

When loop is complete , first slide should be loaded again smoothly without re-rendering and flickering

Actual behaviour

When loop is complete , first slide image is re-rendered / refreshed and there is a blink.

How to reproduce it>

 <Swiper
      removeClippedSubviews={false}
      autoplay
      key={jsonMovies.length}
      loadMinimal={true}
      loop={true}
      loadMinimalSize={1}
      loadMinimalLoader={<ActivityIndicator />}
    >
      {Pages()}
    </Swiper>

Steps to reproduce

1.Add loop={true}

I tried to add removeClippedSubviews={false} like suggested in other posts , still the sliders are rendered again after loop ended.

abdulsamadola commented 2 years ago

@vishnuc did you get it fixed?

rajan-keypress commented 2 years ago

removeClippedSubviews={false} and React.memo work for me

LoknathPandit commented 2 years ago

it works for me

Yieron commented 2 years ago

it works for me too

MuhammadFaisal12q commented 1 week ago

removeClippedSubviews={false} work for me