React native scroll to an offset while scrolling through the list

422 Views Asked by At

I am trying to implement static list sized pagination in react native (i.e) will have static list size and on scrolling based on the threshold (say 80% list viewability reached) will add more item at bottom and will remove list items from top. Same way while scrolling up will add list items at top and will remove at bottom.

Issue I am facing is, while on scrolling the listRef.scrollToOffSet (I used getLayout props to find out the height to be adjusted) is not working. It is working fine if I add debugger while dev testing. But without debugger the list is not moving to the specified offset.

Can you please help me out to figure how to implement the same?

0

There are 0 best solutions below