I'm trying to implement a ScrollView that animates the Y position of a slider.
My ScrollView is actually a FlatList, and I'm using onScroll to animate the position of my slider.
I tried to use a Animated.View and use position.setValue in the onScroll event.
I also tried to use ref.setNativeProps to see if that speeds things up a bit, but the result is exactly the same.
It made me understand that it's not the animation that is slow, but the onScroll event that is "stuttering".
Here's the result with a ListView (smooth as a baby's butt)

And here's what's happening with FlatList

It's even more striking when looking at the app at 60 fps.
Is there some kind of optimizations on FlatList that throttles the onScroll event ? Maybe there is or there should be a way to opt-out of some of those ?
I'm trying to implement a ScrollView that animates the Y position of a slider.
My
ScrollViewis actually aFlatList, and I'm usingonScrollto animate the position of my slider.I tried to use a
Animated.Viewand useposition.setValuein theonScrollevent.I also tried to use
ref.setNativePropsto see if that speeds things up a bit, but the result is exactly the same.It made me understand that it's not the animation that is slow, but the
onScrollevent that is "stuttering".Here's the result with a
ListView(smooth as a baby's butt)And here's what's happening with
FlatListIt's even more striking when looking at the app at 60 fps.
Is there some kind of optimizations on
FlatListthat throttles theonScrollevent ? Maybe there is or there should be a way to opt-out of some of those ?