react-native-swipeout icon indicating copy to clipboard operation
react-native-swipeout copied to clipboard

Swipeout slow (clunky) on large lists

Open coderdave opened this issue 10 years ago • 6 comments

I followed the wiki on disabling the scrolling on lists when swiping: https://github.com/dancormier/react-native-swipeout/wiki/Scrolling

Which works, but when you have large lists (~60+ rows), the swipeout is slow to respond because it's setting state on the list constantly.

I managed to modify the suggested code to first check if the scrollEnabled value has changed and it's a little bit quicker:

  allowScroll(scrollEnabled) {
    if (this.state.scrollEnabled != scrollEnabled) {
      this.setState({ scrollEnabled: scrollEnabled })
    }
  }

However, after scrolling through the list a few times and then swiping out, it eventually gets clunky. It's more noticeable on an actual device also.

Workarounds? Suggestions?

coderdave avatar Oct 17 '15 19:10 coderdave

+1 on this

avishayil avatar Feb 23 '16 11:02 avishayil

It is really laggy for me too. It has to use Animated library for best performance.

bcalik avatar Feb 24 '16 13:02 bcalik

Also very laggy for me, list size 20-50. Any new workarounds?

afreel avatar Oct 31 '16 02:10 afreel

me too

shiqian123 avatar Nov 02 '16 10:11 shiqian123

same issue

yash2code avatar Jul 10 '17 06:07 yash2code

try this,please https://github.com/bolan9999/react-native-largelist

Features The performance of react-native-largelist is much better than FlatList and SectionList. Large data source supported, infinite data supported, super fast sliding support. Full cross-platform. Sticky Section support. Callback when Cell/Item enter/leave the safeArea support. List header/footer/empty support. Swipe out to edit Cell. Pull to Refresh and Scroll loading more. Scroll loading more custom view support, all data source load completed custom view support. Dynamic variable support, for example: size, contentOffset, currentSection, contentSize, height of Header/Footer, visibleIndexPaths and so on. Scroll to offset or index path. Reload data. Custom optimize parameters. More callbacks or dynamic variable can be added through a new issue.

bolan9999 avatar Jan 08 '18 08:01 bolan9999