DEV Community

Discussion on: Executing arrays of async/await JavaScript functions in series vs. concurrently

Collapse
 
dance2die profile image
Sung M. Kim

Thank you Corey for the post~ 🙂

I can think of using the principles in this article and apply on a web page.

Say, if one needs to display a part of webpage as quickly as possible, then we can use the sequential route.

If all contents need to be displayed at once, then concurrently.

Would the application work by chance?

Collapse
 
ccleary00 profile image
Corey Cleary

Hey Sung, yeah I think thats accurate. For fetching things needed for certain parts of the webpage, doing it in series/sequentially will work as long as you load them in the right order (i.e. - the component that needs its data fetched first has its function run before the others)

Collapse
 
dance2die profile image
Sung M. Kim

Thank you for the clarification, Corey~ 🤜