alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stuttering performance due to state update

johnfrancisgit opened this issue · comments

commented

The swiper has poor performance / stutters when moving because the the panResponder updates the overlay direction in state for the whole swiper component - causing the whole component to be rerendered mid-movement.
Can we extrapolate the overlay outside of the swiper component / state?

Moving the overlay outside of the swiper wouldn't improve the overall performance and it would complicate pretty much everything as the pan responder would have to be passed as a reference so that developers could implement their own overlay labels if they wish to.

However, overlay labels are ignored all together if they are not present so they shouldn't affect performance. [reference here]