react-native-instagram-stories icon indicating copy to clipboard operation
react-native-instagram-stories copied to clipboard

how does pagination works if i have many stories to show?

Open Ahsanali012 opened this issue 1 year ago • 4 comments

Hi,

I needed to know as right now i am just using 30 number to show maximum 30 stories , but how does pagination works automatically on the scroll ? like if i scroll the page number could be incremented is their any way to do this?

Ahsanali012 avatar Jul 28 '24 12:07 Ahsanali012

Hey, you can check react-native documentation. Maybe you could add this callback to avatarListContainerProps and with event it returns figure out if the scroll is at the end of the view. That is what I can recommend to you for now, but I will think about adding FlashList instead of ScrollView. FlashList has onEndReached callback in itself.

LukasFridmansky avatar Jul 29 '24 18:07 LukasFridmansky

Yes FlashList should be added as when scrolled it should call onEndReached so we can paginate

Ahsanali012 avatar Jul 30 '24 19:07 Ahsanali012

@LukasFridmansky Thanks for the great work on the library. I support @Ahsanali012 and your suggestion to add FlashList/FlatList. This will give us more control by exposing onEndReached and ListFooterComponent, allowing us to load the next batch of stories and display a spinner. I have thousands of stories in my app and handling paging with the ScrollView is challenging.

felixyr avatar Jul 31 '24 21:07 felixyr

Is this feature implemented or not if not please allow me to add this feature I want to contribute

Ahsanali012 avatar Aug 18 '24 04:08 Ahsanali012