Rx JS is a very hot topic in nowadays market and uses about declarative style of programming to avail event based synchronous or asynchronous results based on event emitted by event emitters i.e. Observable.
While in reactive programming any change in value of b and c will update value of a
Q – Difference between Pull Vs Push based systems?
Promises are push based . May or may not return one value
Observables push based. May return 0 to infinite values
Observers are just objects with three callbacks, one for each type of notification that an Observable may deliver. Next, Error and Complete
What is a Subscription? A Subscription is an object that represents a disposable resource, usually the execution of an Observable.
Subject – Observable + Observer. Multicasts the value to multiple observers
Few examples on same:-
Creating Observable
Creating an Observer
Creating a subscription
Closing a subscription
Subject
Skip schedulers as an excercise
Observable, Observer, subscription, subscribing & Cancelling a subscription
Observable, Observer, subscription, subscribing & Cancelling a subscription
Operators - Operators are methods on the Observable type. When called, they do not change the existing Observable instance. Instead, they return a new Observable, whose subscription logic is based on the first Observable.
Observable, Observer, subscription, subscribing & Cancelling a subscription
Observable, Observer, subscription, subscribing & Cancelling a subscription