property 27flatlist 27 does not exist on type 27typeof animated 27

Solutions on MaxInterview for property 27flatlist 27 does not exist on type 27typeof animated 27 by the best coders in the world

showing results for - "property 27flatlist 27 does not exist on type 27typeof animated 27"
Ilaria
13 Feb 2017
1// to use animated flatlist use this syntax
2import {FlatList} from 'react-native';
3import Animated, {
4  withSpring,
5  useAnimatedStyle,
6  useSharedValue,
7  useAnimatedGestureHandler,
8  withDecay,
9  useAnimatedScrollHandler,
10} from 'react-native-reanimated';
11
12const AnimatedFlatList = Animated.createAnimatedComponent(FlatList);
13
14const translateY = useSharedValue(0);
15
16const scrollHandler = useAnimatedScrollHandler((event) => {
17        console.log(translateY);
18        translateY.value = event.contentOffset.y;
19      });
20
21
22<AnimatedFlatList
23  data={DATA}
24  onScroll={scrollHandler}
25  ListHeaderComponent={FlatListHeader}
26  renderItem={RenderIteam}
27  scrollEventThrottle={16} // <-- Use 1 here to make sure no events are ever missed
28
29  contentContainerStyle={{
30                         paddingTop: 60,
31                         paddingHorizontal: 25,
32                         paddingBottom: 60,
33                         width: Screen.width,
34                        }}
35  />