import { View, Image } from 'react-native'; import { TapGestureHandler } from 'react-native-gesture-handler'; import Animated, { useSharedValue, useAnimatedGestureHandler, useAnimatedStyle, withSpring, } from 'react-native-reanimated'; const AnimatedImage = Animated.createAnimatedComponent(Image); export default function EmojiSticker({ imageSize, stickerSource }) { const scaleImage = useSharedValue(imageSize); const onDoubleTap = useAnimatedGestureHandler({ onActive: () => { if (scaleImage.value !== imageSize * 2) { scaleImage.value = scaleImage.value * 2; } }, }); const imageStyle = useAnimatedStyle(() => { return { width: withSpring(scaleImage.value), height: withSpring(scaleImage.value), }; }); return ( ); }