Skip to content

Instantly share code, notes, and snippets.

@jmacqueen
Created February 14, 2019 20:05
Show Gist options
  • Save jmacqueen/c457983e3f93ce84199ffbfc41e1257a to your computer and use it in GitHub Desktop.
Save jmacqueen/c457983e3f93ce84199ffbfc41e1257a to your computer and use it in GitHub Desktop.
During the mocking phase, I like to see loading states, too!
mockData = [1,2,3]
const getSlowThing = async () => {
await new Promise(resolve => setTimeout(resolve, 3000))
return Promise.resolve(mockData)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment