I was trying to decrease the number of re-renders when items where added to the list after onStartReached or onEndReached were called. There were unecessary re-renders of already created items (at least in my view, maybe there is a reasoning for that), so I wanted only new items to call the renderItem prop passed to the Flatlist and improve the list rendering.
For that, I proposed a PR #1 using React.memo and React.useCallback to memoize the already rendered items and only call the renderItem to the new items on the list. Hope it'll be helpful somehow.
I was trying to decrease the number of re-renders when items where added to the list after onStartReached or onEndReached were called. There were unecessary re-renders of already created items (at least in my view, maybe there is a reasoning for that), so I wanted only new items to call the
renderItem
prop passed to theFlatlist
and improve the list rendering.For that, I proposed a PR #1 using React.memo and React.useCallback to memoize the already rendered items and only call the
renderItem
to the new items on the list. Hope it'll be helpful somehow.