computerjazz / react-native-infinite-pager

An infinitely-swipeable pager component.
MIT License
175 stars 16 forks source link

Some info needed. #8

Open SymntxHomendra51 opened 2 years ago

SymntxHomendra51 commented 2 years ago

Thanks, @computerjazz for this life saviour package. I was trying my luck with the original rn pager view but I failed hard. I'm trying to make a record list according to date. The date will change on swiping the page.

I need to ask how you are handling a big number of pages are you using flat list. Is this optimized for ios?

computerjazz commented 2 years ago

Hi, there is no backing list component, all swipe gestures and animations are driven by react-native-gesture-handler and react-native-reanimated. As far as performance, it really doesn't matter how many items are in your list -- the only items rendered are the visible item and items immediately on either side of it (you can configure how many items are rendered to the left and right via pageBuffer prop). This makes it remain performant on "infinite" data sets, like a calendar.

I actually already built react-native-swipe-calendar on top of react-native-infinite-pager -- maybe it's all you need to do your date rendering: https://github.com/computerjazz/react-native-swipe-calendar

example here: https://snack.expo.dev/@computerjazz/react-native-swipe-calendar