Last active
November 6, 2017 19:57
-
-
Save Siemko/e43b0fca4a1224203f83b040cbe64764 to your computer and use it in GitHub Desktop.
Raw
comment-list-container.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
class CommentListContainer extends React.Component { | |
state = { comments: [] } | |
componentDidMount() { | |
getAsync("https://imaginary-api.gorrion.io/my-comments") | |
.then(comments => this.setState({ comments })) | |
} | |
render() { | |
return <CommentList comments={this.state.comments} />; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment