const CommentItem = React.createClass({ getInitialState() { return {showReply: false}; }, showReply(event) { event.preventDefault(); this.setState({showReply: true}); }, cancelReply(event) { event.preventDefault(); this.setState({showReply: false}); }, renderReply() { ({CommentNew} = Telescope.components); return (
Cancel
) }, render() { const htmlBody = {__html: this.props.htmlBody}; return (
  • Reply {this.state.showReply ? this.renderReply() : ""}
  • ) } }); module.exports = CommentItem;