1

I have a list of Animated.View's placed inside a container component:

return (
  <View>
    {items.map(item => (
      <Animated.View key={item.id} entering={FadeIn} exiting={FadeOut}>
        <Text>{item.name}</Text>
      </Animated.View>
    ))}
  </View>
);

But when an item is removed, the parent height changes instantly, even though the item is still fading out.

How can I make the parent component wait for the child to fade out before changing its height?

Jeff
  • 80
  • 4
  • Make the parent an `Animated.View` and give it a prop `layout={layout}`. Make sure to `import { layout } from "react-native-reanimated"`. – Kartikey May 25 '23 at 06:05
  • @Kartikey, thanks for the answer, but that did not work. I made every external view and the ScrollView use the Reanimated equivalents, but that also did not work. – Jeff May 25 '23 at 19:48

0 Answers0