Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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