$ git show like-burst

Like burst

Intermediate/anim like-burst

Heart squashes, pops bigger and fills, with a ring bursting outward.

Main · New Architecture only · worklets live in react-native-worklets

This snippet uses APIs that didn’t change between versions, so the same code runs on Reanimated 4 and 3.

withSequencewithSpring
like-burst.tsx · reanimated 4
const scale = useSharedValue(1);
const onLike = () => {
  scale.value = withSequence(
    withTiming(0.6, { duration: 90 }),
    withSpring(1.25, { damping: 4 }),
    withSpring(1),
  );
  setLiked(v => !v);
};
const style = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }] }));