Created
November 22, 2020 06:45
-
-
Save banyucenter/fb78a3ae34ea7a49a6a12b891cf0294a 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
const getMoviesFromApi = () => { | |
return fetch('https://reactnative.dev/movies.json') | |
.then((response) => response.json()) | |
.then((json) => { | |
return json.movies; | |
}) | |
.catch((error) => { | |
console.error(error); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment