Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Last active August 29, 2015 14:17
Show Gist options
  • Save edipofederle/04341d9fb1d8cf0af56d to your computer and use it in GitHub Desktop.
Save edipofederle/04341d9fb1d8cf0af56d to your computer and use it in GitHub Desktop.
onSearchPressed() {
fetch(buildApiUrl(this.state.query))
.then(response => response.json())
.then(json => this._handleResponse(json))
.catch(error =>
this.setState({
message: 'Shit!' + error,
isLoading: false}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment