Gestures, like panning or scrolling, and other events can map directly to animated values using Animated.event() which triggers when you scroll (in your case). The first level is an array to allow mapping across multiple args, and that array contains nested objects.
For example, when working with horizontal scrolling gestures, you would do the following in order to map event.nativeEvent.contentOffset.x to this._scrollX (should be Animated.Value) without having to setState and re-render the component hierarchy. This is done in an optimized way that is faster than calling setState and re-rendering.
CLICK HERE to find out more related problems solutions.