mirror of
https://github.com/embarklabs/dreddit-tutorial.git
synced 2026-08-31 05:21:12 +00:00
23 lines
506 B
JavaScript
23 lines
506 B
JavaScript
import React, { Component } from 'react';
|
|
import { Post } from './Post';
|
|
|
|
export class List extends Component {
|
|
|
|
render() {
|
|
return (<React.Fragment>
|
|
{this.props.posts.map(post => {
|
|
return (<Post
|
|
key={post.id}
|
|
id={post.id}
|
|
description={post.description}
|
|
creationDate={post.creationDate}
|
|
upvotes={post.upvotes}
|
|
downvotes={post.downvotes}
|
|
owner={post.owner}
|
|
/>)
|
|
})}
|
|
</React.Fragment>
|
|
)
|
|
}
|
|
}
|