In official react-native documentation there is a section about Animated.event method. As example they use following code:
Animated.event
onScroll={Animated.event(
Write handler function like:
handleScroll = (e) => { console.log(e.nativeEvent.contentOffset.y); }
and you can add listener like this:
listener
Animated.event( [{ nativeEvent: { contentOffset: { y: this.state.scrollY } } }], { listener: (event) => this.handleScroll(event) } )