Is there something like this for event systems?
I mean, if I send stuff to the server and wait for it to answer, promises work really well.
But what about things like onClick? The promise can only resolve once.
I've also personally been using Rx and RxJS a lot and have been enjoying it a lot over the past few years. Observables and async iterators are both features that are on standards track for the language. See https://github.com/zenparsing/es-observable and https://github.com/Reactive-Extensions/RxJS
Is there something like this for event systems?
I mean, if I send stuff to the server and wait for it to answer, promises work really well.
But what about things like onClick? The promise can only resolve once.