|
@@ -48,11 +48,14 @@ let CommentForm = React.createClass({
|
|
|
});
|
|
|
|
|
|
let CommentBox = React.createClass({
|
|
|
+ getInitialState: function () {
|
|
|
+ return { data: [] };
|
|
|
+ },
|
|
|
render: function () {
|
|
|
return (
|
|
|
<div className="commentBox">
|
|
|
<h1>Comments</h1>
|
|
|
- <CommentList data={this.props.data} />
|
|
|
+ <CommentList data={this.state.data} />
|
|
|
<CommentForm />
|
|
|
</div>
|
|
|
);
|