DEV Community

Discussion on: Polling with async/await

Collapse
 
lackorol profile image
lackorol

I have similar code where I would like to use polling.
What doesnt make sense how you are in first example
branching on result if await makes code flow synchronous,
so if-else in async block should be called after returning result from
asynchronous fn().