Created
February 14, 2019 17:06
-
-
Save purushotamrai/b3f9d0041405685bbf0cc515a59cc638 to your computer and use it in GitHub Desktop.
Getting Started with ReactJS and Drupal - Step 4.1 - App.js - loadDestinations
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
loadDestinations() { | |
// Fetch Destinations. | |
fetch(LIST_URL, {mode:'cors'}) | |
.then(function (response) { | |
return response.json(); | |
}) | |
.then((data) => this.updateData(data)) | |
.catch(err => console.log('Fetching Destinations Failed', err)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment