Skip to content

Instantly share code, notes, and snippets.

@banyucenter
Created November 22, 2020 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save banyucenter/fb78a3ae34ea7a49a6a12b891cf0294a to your computer and use it in GitHub Desktop.
Save banyucenter/fb78a3ae34ea7a49a6a12b891cf0294a to your computer and use it in GitHub Desktop.
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