Skip to content

Instantly share code, notes, and snippets.

@ishaqibrahimbot
Last active February 6, 2022 10:32
Show Gist options
  • Save ishaqibrahimbot/7fb177c62e2e92b7c3d1143902c5752b to your computer and use it in GitHub Desktop.
Save ishaqibrahimbot/7fb177c62e2e92b7c3d1143902c5752b to your computer and use it in GitHub Desktop.
Mapping an array to create components in React
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