Created
March 18, 2019 09:38
-
-
Save Kirill255/e86d8e078724aad5d5c671522467d8fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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