Created
January 25, 2022 03:34
-
-
Save bobdobbs/ee2bcfeece9d85bcbdaafcf3c229a134 to your computer and use it in GitHub Desktop.
passing in props to function components within .map
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
let billionaires = [ | |
{ name : 'Bill Gates', email : '[email protected]' }, | |
{ name : 'Jeff Bezos', email : '[email protected]' }, | |
{name : 'Mark Zuckerberg', email : '[email protected]'} | |
] | |
function List(i) { | |
return( | |
<ul> | |
{ | |
billionaires.map( | |
(i) => ( | |
<li> | |
{i.name} | |
</li> | |
) | |
) // ends map | |
} | |
</ul> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment