Skip to content

Instantly share code, notes, and snippets.

@harshaktg
Created September 8, 2020 13:40
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 harshaktg/5128e8df350c8981e3805e221359f5eb to your computer and use it in GitHub Desktop.
Save harshaktg/5128e8df350c8981e3805e221359f5eb to your computer and use it in GitHub Desktop.
API file
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