Async Generators for Paged APIs
There’s one JavaScript feature that’s not often talked about but enables heaps of advanced functionality, specifially around streaming data in both frontend and backend codebases. That’s Async Generators. It’s a feature that was first introduced in ES2017/ES8 but remains largely outside the scope of knowledge of many developers. However, if you have an application that deals with streaming data using GraphQL or transferring data over websockets you may have come across generator functions before. ...