import React, { Component, createRef } from 'react'; import { FlatList as RNFlatList, FlatListProps as RNFlatListProps, StyleProp, ViewStyle, View, } from 'react-native'; import Animated from 'react-native-reanimated'; import { NativeViewGestureHandler } from 'react-native-gesture-handler'; const AnimatedFlatList = Animated.createAnimatedComponent( RNFlatList ) as React.ComponentClass< Animated.AnimateProps>, any >; type Props = Omit< RNFlatListProps, | 'overScrollMode' | 'bounces' | 'decelerationRate' | 'onScrollBeginDrag' | 'scrollEventThrottle' | 'style' > & { style?: StyleProp>; height?: number; gestureRef?: any; }; export default class FlatList extends Component, {}> { state = { scrollContentHeight: 0, }; nativeGestureRef = createRef(); handleScrollSizeChange = (w: number, h: number) => { this.setState({ scrollContentHeight: h, }); }; render() { const { ...props } = this.props; return ( ); } }