Created
November 22, 2020 06:46
-
-
Save banyucenter/d5bf9d7ea3a8b70228f8e760b7188b30 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 getMoviesFromApiAsync = async () => { | |
try { | |
let response = await fetch( | |
'https://reactnative.dev/movies.json' | |
); | |
let json = await response.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