react-native-draggable-flatlist
react-native-draggable-flatlist copied to clipboard
Animated header
I want to create a animated header when scroll, but prop onScroll not work onScroll={Animated.event( [{ nativeEvent: { contentOffset: { y: offset } } }], { useNativeDriver: false } )}
convert component to Animated component.
ex. const ReanimatedDraggableFlatList = Animated.createAnimatedComponent(DraggableFlatList);
Try this fork https://github.com/vickyneosoft/react-native-draggable-flatlist?organization=vickyneosoft&organization=vickyneosoft
Use below method to animate your scroll
const onScroll = useCallback((event) => {
console.log('event : ', event);
}, [])
And NO NEED to use createAnimatedComponent already done by library
Hope this will surely work for you