Skip to content

Instantly share code, notes, and snippets.

@Kirill255
Created March 18, 2019 09:38
Show Gist options
  • Save Kirill255/e86d8e078724aad5d5c671522467d8fc to your computer and use it in GitHub Desktop.
Save Kirill255/e86d8e078724aad5d5c671522467d8fc 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)}`);
});
//
import showResults from "./showResults";
const values = {/* values */};
showResults(values);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment