Skip to content

Instantly share code, notes, and snippets.

@40thieves
Created February 14, 2019 12:27
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 40thieves/df632143f45d97793c3f7aceb833c061 to your computer and use it in GitHub Desktop.
Save 40thieves/df632143f45d97793c3f7aceb833c061 to your computer and use it in GitHub Desktop.
class App extends Component {
componentDidMount() {
Promise.all([fetch('URL_1_HERE'), fetch('URL_2_HERE')])
.then((articles) => {
this.setState({
articles: articles
})
})
}
render() {
return (
<ArticleShower articles={this.state.articles} />
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment