Observables - YamamotoDesu/Yamamoto-Notes GitHub Wiki
Observable provides the foundation of Rx code: the ability to asynchronously produce a sequence of events that can “carry” an immutable snapshot of generic data of type Element.
In the simplest words, it allows consumers to subscribe for events, or values, emitted by another object over time.
The Observable class allows one or more observers to react to any events in real time and update the app’s UI, or otherwise process and utilize new and incoming data.
An Observable can emit (and observers can receive) only three types of events:
An event that “carries” the latest (or “next”) data value. This is the way observers “receive” values. An Observable may emit an indefinite amount of these values, until a terminating event is emitted.
This event terminates the event sequence with success. It means the Observable completed its lifecycle successfully and won’t emit additional events.
The Observable terminates with an error and will not emit additional events.