cleaning up app component

master
Matt Huntington 9 years ago
parent 003aa54369
commit c6132d96ad

@ -6,10 +6,6 @@ class App extends React.Component {
constructor(props){ constructor(props){
super(props); super(props);
this.addComment = this.addComment.bind(this); this.addComment = this.addComment.bind(this);
this.state = {
comments: [
]
}
} }
addComment(value){ addComment(value){
this.state.comments.push({ body: value }); this.state.comments.push({ body: value });
@ -19,7 +15,7 @@ class App extends React.Component {
} }
render() { render() {
return <section> return <section>
<CommentsList comments={this.state.comments}/> <CommentsList/>
<CommentsForm handleSubmit={this.addComment}/> <CommentsForm handleSubmit={this.addComment}/>
</section> </section>
} }

Loading…
Cancel
Save