re: JavaScript Iterators and Generators: Asynchronous Iterators VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Oh wow, this is next level! Also TIL about for-await-of; neat. Do you have some examples of where this can be really helpful in real world code? ...
 

I was thinking pagination could be a use case candidate for async iteration.

const page = await pagination[Symbol.asyncIterator]().next();
 

Yes of course. I've already briefly mentioned it into the 'The consumer pressure problem' section 😃

code of conduct - report abuse