>#WIP
tsconst width = useSharedValue(100);
const handlePress = () => {
width.value = width.value + 50;
};
.value
で値にアクセスできる .value
をmutableに更新するtsimport Animated from 'react-native-reanimated';
<Animated.View
style={{
width,
height: 100,
backgroundColor: 'violet',
}}
/>
NG(ts)<Animated.View style={{ width: width * 5 }} />