DEV Community

Discussion on: Build a lightweight Internet Detect Feature with VanillaJS

Collapse
 
belinde profile image
Franco Traversaro

In case of bad design of asynchronous calls with some degree of parallelization or sequentiality. A quick example because I'm writing on mobile: call A, then after one second call B, and the application assume that A will respond before B. On a bad connection A and B could return in the same instant, or even B before A. A poor coding choice could create an invalid state in the application. I'm speaking theoretically, but I've seen similar problems some months ago.