RxJS is to events as promises are to async
Asked Answered
S

1

5

In Requesting a clear, picturesque explanation of Reactive Extensions (RX)? I asked about what RX is all about, and I think, thanks to the provided answers I now got the idea.

In the referenced question i quoted a sentence from http://reactive-extensions.github.com/RxJS/ which says:

RxJS is to events as promises are to async.

Although I think that I got the idea behind RX, I do not get this sentence at all. I can not even say what it is exactly that I do not understand. It's more like ... I don't see the connection between the first and the second half of the sentence.

To me, this sentence sounds important and impressive, but I can hardly tell whether it's true or not, whether it's a great insight or not, and so on ...

Can anybody explain what the sentence means in words someone (like me) can understand who is new to all this reactive stuff?

Sebrinasebum answered 25/2, 2013 at 8:9 Comment(1)
This link here was what cleared the mud for me : egghead.io/lessons/rxjs-rxjs-observables-vs-promisesErlindaerline
I
7

Promises are a way to define computations that may happen once an asynchronous operation completes. RxJs is a way to define computations that may happen when one or more events, in a stream, occur (onNext), complete (onCompleted), or throw an exception (onError).

Inject answered 25/2, 2013 at 11:28 Comment(1)
You can see Observable as sequence of promises.Golub

© 2022 - 2024 — McMap. All rights reserved.