const PostItem = React.createClass({ propTypes: { post: React.PropTypes.object.isRequired, // the current comment currentUser: React.PropTypes.object, // the current user }, renderCategories() { ({PostCategories} = Telescope.components); return this.props.post.categoriesArray ? : ""; }, renderCommenters() { ({PostItemCommenters} = Telescope.components); return this.props.post.commentersArray ? : ""; }, renderActions() { return ( ) }, render() { const post = this.props.post; return (

{post.title}

{Users.getDisplayName(post.user)}, {moment(post.postedAt).fromNow()}, {post.commentCount} comments

{this.renderCategories()} {this.renderCommenters()} {this.renderActions()}
) } }); module.exports = PostItem;