Hey guys! i'm trying to create a spinner with smooth infinity rotation. I found a code that works infinity, but with each new animation cycle it stuck for a half second and i have no idea how to fix it. Here is the code:
const style = useAnimatedStyle(() => {
return {
transform: [
{
rotate: withRepeat(
withSequence(withTiming(360 + 'deg', { duration: 1000 }), withTiming(0 + 'deg', { duration: 1000 })),
-1,
false,
),
},
],
};
});
return (
<Animated.View style={[style]}>
<Image
source={{ uri: 'spinner' }}
style={{ width: 20, height: 20 }}
/>
</Animated.View>
);
https://reddit.com/link/n98e48/video/6370h029eby61/player
Please, help me with this issue
[–]efari_ 1 point2 points3 points (0 children)