Answers for "flatlist scroll animation"

0

flatlist scroll animation

import {Animated } from 'react-native'
 
 const AnimatedFlatList = Animated.createAnimatedComponent(FlatList);
  
  
  render() {
    return (
      <AnimatedFlatList
        refreshing={this.state.isLoading}
        onRefresh={this.onRefresh}
        contentContainerStyle={{ paddingTop: 200 }}
        scrollEventThrottle={16} // <-- Use 1 here to make sure no events are ever missed
        onScroll={this.props.onScroll}
        data={data}
        renderItem={this._renderItem}
        keyExtractor={(item, i) => i}
      />
    );
  }
}


onScroll={
Animated.event(
[{ nativeEvent: { contentOffset: { y: scrollY } } }],
{ useNativeDriver: false }
)}
Posted by: Guest on May-21-2021

Code answers related to "flatlist scroll animation"

Browse Popular Code Answers by Language