-
-
Save reime005/08ee63d7a51cf50c1134571f51614bcd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pan = React.useRef(new Animated.ValueXY()).current; | |
<FlatList | |
... | |
onScroll={Animated.event( | |
[{ nativeEvent: { contentOffset: { x: pan.x } } }], | |
{ | |
useNativeDriver: false, | |
}, | |
)} | |
keyExtractor={(item, index) => `${index}-${item}`} | |
renderItem={renderItem} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment