onScroll({ x: Node, y: Node }): EventNode
Returns a reanimated event handler for the ScrollView.
onScroll(contentOffset: { x?: Node; y?: Node; }) => EventNode
Example usage for a vertical ScrollView
.
<Animated.ScrollView onScroll={onScroll({ y: new Value(0) })} vertical />
And for a horizontal one..
<Animated.ScrollView onScroll={onScroll({ x: new Value(0) })} horizontal />