I am using flatlist to render my data in react native but flatlist renders large amount of data very slow and after scrolling fast it re-renders the data. Due to which my app takes lots of time to display full data. I also got message like
VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate
I have tried all flatlist optimization techniques still flatlist rendering is slow. Any suggestions, how to solve this?
my flatlist component look like
<FlatList
data={questionArray}
showsVerticalScrollIndicator={false}
renderItem={renderItem}
keyExtractor={keyExtractor}
/>
const renderItem = useCallback(
({ item, index }) => {
....
},
[]
);
const keyExtractor = useCallback((item, index) => index.toString(), []);