Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.