VirtualizedList has hard coded scrollEventThrottle value
See original GitHub issueDescription
We’re doing animations based on onScroll in a <FlatList>, but the result is choppy in iOS. We tried setting scrollEventThrottle={16} on the <FlatList> component itself, then inside a renderScrollComponent function. No surprise it didn’t work, since it gets overridden in VirtualizedList.
Clearly there’s some thought behind setting it to 50, and some concern about Android where the property has no effect, but is it critical? Our Flatlists work pretty well on Android as is, after all… and setting a lower throttle doesn’t seem to have any catastrophic side effects on iOS.
Solution
It all depends on what the original reason for hard coding the value to 50 was, but if it was just some happy performance middle ground, then allow it to be overridden by property on the component. @sahrens is a clever guy and will have a great answer I’m sure.
Additional Information
- React Native version: Current master https://github.com/facebook/react-native/commit/22a4205bdd63d60c7d7290693aaccfe47e84ebb3
- Platform: iOS
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:8 (6 by maintainers)

Top Related StackOverflow Question
Thanks a lot for the fix @sahrens https://github.com/facebook/react-native/commit/f186cfb9d657bacafa32588b96de6ddac0786cf8
@andreleon: changing the throttle is not supported, you’ll need to manage it in your own code, e.g. with a
Batchinator