Last active
February 6, 2022 10:32
-
-
Save ishaqibrahimbot/7fb177c62e2e92b7c3d1143902c5752b to your computer and use it in GitHub Desktop.
Mapping an array to create components in React
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
function SomeReactComponent({ data }) { | |
return ( | |
<div> | |
{data.map(text => <p>{text}</p>)} | |
</div> | |
) | |
} | |
//space |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment