I noticed useAnimatedProps hook used in reanimated V2 liquid swipe example and nothing in documentation about it. As the name suggests, is it used for the props that are updating, am I right? or it is only for the animated components that are created using createAnimatedComponent?
It's to animated props which are not style props. for instance
const props = useAnimatedProps(() => {
return {
strokeDashoffset: theta.value * radius,
};
});
return (
<Svg style={StyleSheet.absoluteFill}>
<AnimatedCircle
animatedProps={props}
cx={r}
cy={r}
fill="transparent"
r={radius}
stroke={StyleGuide.palette.primary}
strokeDasharray={`${circumference}, ${circumference}`}
{...{ strokeWidth }}
/>
</Svg>
);
Thanks @wcandillon for your great example. Means a lot to me.
hey, thanks for letting us know. This is definitely an oversight and we will add this to the documentation soon
Most helpful comment
It's to animated props which are not style props. for instance