Skip to content

Instantly share code, notes, and snippets.

@iamthesiz
Last active April 19, 2020 01:54
Show Gist options
  • Save iamthesiz/c8fdf0e6c232638719909a72b79a7a77 to your computer and use it in GitHub Desktop.
Save iamthesiz/c8fdf0e6c232638719909a72b79a7a77 to your computer and use it in GitHub Desktop.
for blog post
const { data: todos, loading } = useFetch('https://jsonplaceholder.typicode.com/todos', {
data: [], // <- we set this so our initial `data` is an array
}, []) // <- this empty array signifies, run onMount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment