I have a list of blocks as childrens when a sequence those blocks are hovered, I want them to change there opacity, the function BlockStyle
below does not change the style based on index
, how can I change each child opacity based on it index
this is what i tried,
const opacity = useSharedValue(new Array(BlockNumber).fill(1));
const BlockStyle = (index) => useAnimatedStyle(() => {
return {
opacity : opacity.value[index]
};
})
opacity.value[block] = 0.5