title: React-native animated.event custom onScroll listener
body: <p>In official react-native documentation there is a section about <code>Animated.event</code> method. As example they use following code:</p>
  
  <pre><code>onScroll={Animated.event(
     // scrollX = e.nativeEvent.contentOffset.x
     [{ nativeEvent: {
          contentOffset: {
            x: scrollX
          }
        }
      }]
   )}
  </code></pre>
  
  <p>I would like to map correct values to <code>Animated.event</code> method and I would also like to map onScroll callback parameters to my own callback. Basically I would like to do something like this:</p>
  
  <pre><code>onScroll={(event) =&gt; {
    myOwnCallback(event.nativeEvent.contentOffset.x)
    Animated.event(
      // scrollX = e.nativeEvent.contentOffset.x
      [{nativeEvent: {
          contentOffset: {
            x: scrollX
          }
        }
      }]
    )
  }}
  </code></pre>
  
  <p>Could you please explain how to do that?</p>