react-native-swipeout
react-native-swipeout copied to clipboard
Swipeout slow (clunky) on large lists
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?
+1 on this
It is really laggy for me too. It has to use Animated library for best performance.
Also very laggy for me, list size 20-50. Any new workarounds?
me too
same issue
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.