From 16db11411278c2ae1393638a0a38586b2c72f80c Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Tue, 2 May 2017 16:19:37 -0400 Subject: [PATCH] comments list shows comments --- js/components/app.js | 18 +++++++++++++++++- js/components/commentsList.js | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/js/components/app.js b/js/components/app.js index 99c3f6a..97ee7fc 100644 --- a/js/components/app.js +++ b/js/components/app.js @@ -3,9 +3,25 @@ import CommentsList from './CommentsList.js'; import CommentsForm from './CommentsForm.js'; class App extends React.Component { + constructor(props){ + super(props); + this.state = { + comments: [ + { + body:'eat' + }, + { + body:'sleep' + }, + { + body:'find shelter' + } + ] + } + } render() { return
- +
} diff --git a/js/components/commentsList.js b/js/components/commentsList.js index e847e20..ab61cbf 100644 --- a/js/components/commentsList.js +++ b/js/components/commentsList.js @@ -3,7 +3,9 @@ import React from 'react'; class CommentsList extends React.Component { render() { return } }