Accessing argument from useAnimatedStyle #3816
Unanswered
omarelkhal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a list of value in a sharedValue, each value represent the opacity of a children component
list
indexes are similar to the children's indexesconst list = useSharedValue(new Array(BlockNumber).fill(1));
i want to be able to change the child opacity based on it index when setting a new value to list
for example
list.value[index] = 0.5
the
useAnimatedStyle
hook does not change the style if i put it inside the functionChildsStyle
using the argumentindex
like belowhow can I change the child's style based on its index how to correct the function
ChildsStyle
Beta Was this translation helpful? Give feedback.
All reactions