Skip to content

Instantly share code, notes, and snippets.

@Siemko
Last active November 6, 2017 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Siemko/e43b0fca4a1224203f83b040cbe64764 to your computer and use it in GitHub Desktop.
Save Siemko/e43b0fca4a1224203f83b040cbe64764 to your computer and use it in GitHub Desktop.
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