Skip to content

Instantly share code, notes, and snippets.

@harshaktg

harshaktg/api.js

Created Sep 8, 2020
Embed
What would you like to do?
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