diff --git a/apps/common-app/src/apps/reanimated/examples/LayoutAnimations/FinalStateFirstBenchExample.tsx b/apps/common-app/src/apps/reanimated/examples/LayoutAnimations/FinalStateFirstBenchExample.tsx new file mode 100644 index 000000000000..c22b40ba757a --- /dev/null +++ b/apps/common-app/src/apps/reanimated/examples/LayoutAnimations/FinalStateFirstBenchExample.tsx @@ -0,0 +1,97 @@ +import { useState } from 'react'; +import { Alert, Button, Pressable, StyleSheet, Text, View } from 'react-native'; + +// Final-state-first bench (Objective 06). The nativeID markers below make the +// Legacy proxy enqueue controlled prepared native requests on example-app +// builds with IOS_LAYOUT_ANIMATIONS_CORE_ANIMATION on; no production Layout +// Animations run here. With the flag on, the box slides 5 s (taps land at the +// final frame) and the delayed view holds invisible for 1 s, then fades in. +// With the flag off, both views jump. + +const LAYOUT_BENCH_NATIVE_ID = 'fsf-bench-layout'; +const ENTERING_BENCH_NATIVE_ID = 'fsf-bench-entering'; + +export default function FinalStateFirstBenchExample() { + const [moved, setMoved] = useState(false); + const [entered, setEntered] = useState(false); + const [lastTap, setLastTap] = useState('none'); + + return ( + + Final-state-first bench (Objective 06) + + Layout: A → B over 5 s +