3

I want to create a scroll that repeats itself, again and again, i.e. when I keep scrolling to the top I reach the last row and when I scroll to the bottom I reach the first row again.

I have tried searching components for the same, but the best I could find were these -

react-native-infinite-scroll and this stackoverflow answer but both of them only tell about how can I load more data when I reach the ScrollView or ListView end.

Prateek Surana
  • 672
  • 9
  • 29

1 Answers1

3

I searched a lot for this type component but couldn't find any, so I created my own component from scratch using FlatList, and also published it to npm, so anyone can install it using

npm install react-native-infinite-looping-scroll

in your react native project directory.

The component is still in beta so don't expect very good performance from it. But the component is still pretty basic and there's a lot of scope for improvement so anyone who wants to contribute to it can submit a PR here.

Prateek Surana
  • 672
  • 9
  • 29