Kieran-McIntyre / react-native-section-alphabet-list

A simple React Native component that takes an array of data and renders a SectionList with alphabetically sorted data
MIT License
195 stars 55 forks source link

Jerky / Jumps around when using.. #48

Open mattwoberts opened 2 years ago

mattwoberts commented 2 years ago

Hi

Anyone else finding that this component can be quite jerky, and it jumps around when you're using. I've got a video from the simulator here - 249 countries. I just click on the "U" to go there, and you can see it's jumping and struggling with this. Then I move around a little bit and you can see the header bouncing a bit and basically not coping very well.

It's worse on the simulator, on the actual device it's faster but still has the same jumping / stuttering / jerky issues...

https://user-images.githubusercontent.com/109196/175003681-71a4ddb8-b45b-47c1-828d-a2e11912fd04.mp4

Beltarm commented 2 years ago

were you able to fix it?

iamgraeme commented 2 years ago

@mattwoberts Were you able to fix this?

iamgraeme commented 2 years ago

Anyone else looking for a solution for this initialNumToRender={100} maxToRenderPerBatch={500} updateCellsBatchingPeriod={10} windowSize={400} You'll need to change the values based on your list...

JCharante commented 1 year ago

And btw, those props get passed down from AlphabetList to SectionList (initialNumToRender) and it's a child class of VirtualizedList (maxToRenderPerBatch) so you don't need to create a fork or anything (which is what I was starting to do). Just adding initialNumToRender and maxToRenderPerBatch fixed it perfectly for me.