Created
December 24, 2020 04:51
-
-
Save aranda-adapptor/bfdfbd3d8951e91d4b92302538d45763 to your computer and use it in GitHub Desktop.
Iterate and render all stars, passing in StarData as props
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
return ( | |
<View | |
style={{ | |
flex: 1, | |
backgroundColor: "black", | |
}} | |
> | |
{stars.map((s) => ( | |
// The spread operator passes all StarData fields as individual props | |
<Star key={s.id} time={timeVal} {...s} /> | |
))} | |
</View> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment