Last active
August 29, 2015 14:17
-
-
Save edipofederle/04341d9fb1d8cf0af56d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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