React-native-swiper: first and last child components' render method runs twice.

Created on 18 May 2017  路  8Comments  路  Source: leecade/react-native-swiper

I m using the code below, and if a run this code, with sample data say : Data=[{data...},{data...},{data...},{data..}] then the, render of Child component for Data[0] and Data[3] runs twice.

showsButtons={false} showsPagination={false}
loop={true} loadMinimal={false}
index={currentIndex}
onMomentumScrollEnd={(e, state, context) => {
console.warn("index", state.index);
}}>
{
Data.map((item, index) => (
ref={index}
key={index}
setComponent={setComponent} closeProps={closeProps}
toggleScroll={this.toogleScroll}
reRender={false}
game={item} />
))
}

fix this, or give me solution ASAP

Most helpful comment

if you set loop={true} the first and the last screen will be instantiated twice, to help create the illusion of endless loop

All 8 comments

+1 same issue here.

swiper module also slows down the swipe between different screens, on which i have implemented drag drop.
and drag drop is also getting too slow.
this happens only in android, in IOS its working finr

if you set loop={true} the first and the last screen will be instantiated twice, to help create the illusion of endless loop

thanks @wizza-smile :)

Stumped on this for longer than I'd care to admit, thanks @wizza-smile 馃槃

@wizza-smile Are you still working on CodeComplice? It'd hate to see it end up like SublimeCodeIntel because you've put so much work into it and i'm proud to recommend it to any who will listen as it actually works, we appreciate all the work you've done.

How to resolve ? Do you have code?

thank you @wizza-smile you save my life

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hadrienbbt picture hadrienbbt  路  3Comments

tokict picture tokict  路  3Comments

kliuj picture kliuj  路  3Comments

AndrewSouthpaw picture AndrewSouthpaw  路  3Comments

commit-master picture commit-master  路  3Comments