DEV Community

Discussion on: Using a Promise in a click eventListener - more than once.

Collapse
 
alittlebyte profile image
Vlad • Edited

Yes, thank you, this is exactly what I need!
One question, though... how would I write a generator function for Promises?
Search returns nothing, besides information on the Promises themselves.
Shouldn't my existing returnCollectionsId() already work as a generator? From how I see it, it should return a new Promise everytime it is called, but it doesn't. So that's the part I don't get.
Just send an article my way that explains the topic further. Can't find one :\ Thank you again!