diff --git a/Example/src/App.tsx b/Example/src/App.tsx index 6769ab9a08d..a7215442d53 100644 --- a/Example/src/App.tsx +++ b/Example/src/App.tsx @@ -30,6 +30,7 @@ import { BasicNestedLayoutAnimation, BasicNestedAnimation, BasicLayoutAnimation, + DeleteAncestorOfExiting, } from './LayoutReanimation'; import AnimatedStyleUpdateExample from './AnimatedStyleUpdateExample'; @@ -69,6 +70,10 @@ if (Platform.OS === 'android') { type Screens = Record; const SCREENS: Screens = { + DeleteAncestorOfExiting: { + screen: DeleteAncestorOfExiting, + title: '🆕 Deleting view with an exiting animation', + }, BasicLayoutAnimation: { screen: BasicLayoutAnimation, title: '🆕 Basic layout animation', diff --git a/Example/src/LayoutReanimation/DeleteAncestorOfExiting.tsx b/Example/src/LayoutReanimation/DeleteAncestorOfExiting.tsx new file mode 100644 index 00000000000..07400709a88 --- /dev/null +++ b/Example/src/LayoutReanimation/DeleteAncestorOfExiting.tsx @@ -0,0 +1,54 @@ +import Animated, { PinwheelOut } from 'react-native-reanimated'; +import { Button, StyleSheet, View } from 'react-native'; + +import React from 'react'; + +export function DeleteAncestorOfExiting() { + const [outer, setOuter] = React.useState(false); + const [inner, setInner] = React.useState(true); + + return ( + +