Created
September 8, 2020 13:40
-
-
Save harshaktg/5128e8df350c8981e3805e221359f5eb to your computer and use it in GitHub Desktop.
API file
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
export const fetchTodos = () => { | |
return fetch('https://jsonplaceholder.typicode.com/posts') | |
.then(response => response.json()) | |
.then(json => json); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment