August 2017
Beginner
374 pages
10h 41m
English
The next step is writing a component that can display multiple posts:
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
Let's take a closer look at the map() function:
Read now
Unlock full access