On the way of understanding Observable, Observer and subscribe I just came to this example and unable to understand this example and I'm confuse
var observable = Rx.Observable.create(
function(observer) {
observer.onNext('Simon');
observer.onNext('Jen');
observer.onNext('Sergi');
observer.onCompleted(); // We are done }
);
whats happening here? what we are creating here stream of observer? but observer is the one who receives data from stream when subscribing to the stream with subscribe method and have 3 methods onNext, complete and error.
Also give me example. where we create a stream, a observer(standalone) and how this standalone observer subscribe to a observable.