Created
March 4, 2017 13:27
-
-
Save edencakir/a8cf2eaabaca624e75f785b589cd8977 to your computer and use it in GitHub Desktop.
This file contains 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
getDataFromServer() { | |
fetch('http://178.211.49.209:9000/api/getEverything') | |
.then(response => response.json()) | |
.then(responseJson => { | |
console.log('fetched data', responseJson); | |
this.setState({dataSource: ds.cloneWithRows(responseJson.response.categories)}); | |
}).catch(error => console.log(error)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment