title: React Native Android FlatList onScroll Animation
body: <p>I have a FlatList with an onScroll function that looks like this:</p>
  
  <pre><code>&lt;Animated.View style={{ transform: [{translateX: this.state.scrollX}] }}&gt;
    &lt;FlatList
      data={ reactionGroup.reactions }
      keyExtractor={ (i) =&gt; i.id + uuid.v4() }
      renderItem={ this._renderItem }
      horizontal={ true }
      scrollEventThrottle={1}
      onScroll={ reactionGroup.reactions.length &gt; 1 ? this.onScroll : null }
      showsHorizontalScrollIndicator={ false } /&gt;
  &lt;/Animated.View&gt;
  
  onScroll(event) {
    const { timing } = Animated
    if (event.nativeEvent.contentOffset.x &gt; 0) {
      timing(
        this.state.scrollX,
        { toValue: -60, duration: 100, useNativeDriver: true }
      ).start()
    } else {
      timing(
        this.state.scrollX,
        { toValue: 0, duration: 100, useNativeDriver: true }
      ).start()
    }
  },
  </code></pre>
  
  <p>This works great on iOS, but for Android the animation won't start until the FlatList has stopped scrolling. </p>
  
  <p>I'm basically just kicking off an animation when the user scrolls and setting it back when they go back to the beginning of the horizontal scroll.</p>
  
  <p>Is there a better way to handle this so it works on Android?</p>
  
  <p>I also tried doing Animation.event inside onScroll, but I don't want to tie the animation directly to the scroll position. This approach allowed Android to animate while scrolling, but it was pretty jittery.</p>
  
  <p>RN: 0.43.3</p>