3 ms·
You could have been more generous and assumed they meant `succ = await submitForm();`
by rcfox 8y ago
You could have been more generous and assumed they meant `succ = await submitForm();`
- chriswarbo 8y agoI've actually never used any async/await stuff, so I didn't know that's what it's for. All that stuff appeared in JS (and elsewhere) after I stopped doing Web dev. These days I mostly write Haskell, which AFAIK doesn't need all of that async/await/promise stuff because its already covered by laziness.
- rcfox 8y ago`await` is essentially syntactic sugar that means "wrap everything after this in a callback to be executed after this function does something asynchronously."
- chriswarbo 8y agoI see. That would presumably still have the problem of multiple spinners, as I mentioned at the end of my original comment?
- rcfox 8y agoYes. You'd want to guard against this running more then once, probably by disabling the button until the submit finished.
- deleted 8y ago[deleted]