Skip to content

Instantly share code, notes, and snippets.

@anghelalexandra
Created October 19, 2017 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anghelalexandra/80cf5e90c313f4fe767153c1b4d812fd to your computer and use it in GitHub Desktop.
Save anghelalexandra/80cf5e90c313f4fe767153c1b4d812fd to your computer and use it in GitHub Desktop.
React component that displays a list of categories received as a prop
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