Skip to content

Instantly share code, notes, and snippets.

@muscaiu
Created January 29, 2019 13:32
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 muscaiu/c68a62c3ca8ddba0bebd0887af37d4c7 to your computer and use it in GitHub Desktop.
Save muscaiu/c68a62c3ca8ddba0bebd0887af37d4c7 to your computer and use it in GitHub Desktop.
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
export default (async function showResults(values) {
await sleep(500); // simulate server latency
window.alert(`You submitted:\n\n${JSON.stringify(values, null, 2)}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment