Created
October 19, 2017 08:17
-
-
Save anghelalexandra/80cf5e90c313f4fe767153c1b4d812fd to your computer and use it in GitHub Desktop.
React component that displays a list of categories received as a prop
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
import React from "react"; | |
import CategoryCard from "./CategoryCard"; | |
const CategoriesList = props => ( | |
<div> | |
{props.categories.map(element => ( | |
<CategoryCard | |
key={element.id} | |
categId={element.id} | |
src={element.image.src} | |
name={element.name} | |
/> | |
))} | |
</div> | |
); | |
export default CategoriesList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment