August 2017
Beginner
374 pages
10h 41m
English
We already implemented a PostList component earlier in this chapter. The code for this component will not change.
Create a src/components/PostList.jsx file with the following contents:
import React from 'react'
import Post from './Post.jsx'
const PostList = ({ posts }) =>
<ul>
{posts.map(
(post, i) =>
<li key={i.toString()}>
<Post {...post} />
</li>
)}
</ul>
export default PostList
Read now
Unlock full access