Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
...
<Animated.View
onLayout={(e) => {
animatedWidth.current = e.nativeEvent.layout.width;
}}
style={{ flexDirection: 'row' }}
{...starPanResponder.panHandlers}>
{Array.from({ length: 5 }).map((_, i) => {
return (
<Star
key={i}
size={70}
distance={8}
offset={offset - i} // local state
/>
);
})}
</Animated.View>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment