class CommentList extends React.Component {
constructor(props) {
super(props);
}
render() {
return <ul> {this.props.comments.map(renderComment)} </ul>;
}
renderComment({body, author}) {
return <li>{body}—{author}</li>;
}
}
renderCommnet是什么意思
猜你喜欢
转载自blog.csdn.net/game7752/article/details/80193179
今日推荐
周排行