Replies: 1 comment
-
You need to use interpolateNode from reanimated here, not interpolated: const opacityStyles = useAnimatedStyle(() => {
return {
opacity: interpolateNode(currentIndex, {
inputRange: [index - 1, index, index + 1],
outputRange: [0.5, 1, 0.5],
extrapolate: Extrapolate.CLAMP },
}),
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
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 work on a slider. I passing a
currentIndex
property to my component and I want it to be used to animate.See:
On the parent view, I used the Dot component this way:
My problem is that I get the following error :
Argument of type 'AnimatedNode<number>' is not assignable to parameter of type 'number'.
.Can someone help me solve this please ?
Beta Was this translation helpful? Give feedback.
All reactions