7 ms·
RxJS, more specifically its primitive Observables, fills a different space from Promises. For simple cases where only one value is emitted Promise probably work
by mediumdeviation 3y ago
RxJS, more specifically its primitive Observables, fills a different space from Promises. For simple cases where only one value is emitted Promise probably works better and is more intuitive, but there are certain things that Promises cannot model - specifically when there is a stream of events over time. RxJS is more complicated because it needs to model more complex things. I do think Angular made a big mistake overusing it in places where Promises would have worked perfectly fine, but when you do need it it does work pretty well.
- pcthrowaway 3y ago> I do think Angular made a big mistake overusing it in places where Promises would have worked perfectly fine, but when you do need it it does work pretty well. Was it really a mistake or were they just using it before native promises were widely supported?