You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
react-redux/js/components/app.js

31 lines
668 B

import React from 'react';
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 <section>
<CommentsList comments={this.state.comments}/>
<CommentsForm/>
</section>
}
}
export default App;