Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Youtube in React: make comments dynamic
import React from 'react';
import {CommentsHeader} from "./CommentsHeader/CommentsHeader";
import {Comment} from './Comment/Comment';
import {AddComment} from './AddComment/AddComment';
export class Comments extends React.Component {
render() {
if (!this.props.comments) {
return <div/>;
const comments = => {
return <Comment comment={comment} key={}/>
<CommentsHeader amountComments={this.props.amountComments}/>
<AddComment key='add-comment'/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.