-
-
Save reime005/cb84d432d8a827c7f359abfc9062ff6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<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