const CommentNode = React.createClass({ propTypes: { comment: React.PropTypes.object.isRequired, // the current comment currentUser: React.PropTypes.object, // the current user }, renderComment(comment) { ({CommentItem} = Telescope.components); return ( ) }, renderChildren(children) { // ({CommentNode} = Telescope.components); return (
{children.map(comment => )}
) }, render() { const comment = this.props.comment; const children = this.props.comment.childrenResults; return (
{this.renderComment(comment)} {children ? this.renderChildren(children) : ""}
) } }); module.exports = CommentNode;