RxJS github repo explains how to create observable from event or array. I know how to replace the callback hell with async or Promise, but I couldn't find an example on how to create and return observable for my functions doing async tasks.
x = getData();
y = getMoreData(x);
z = getMoreData(y);
...
getData(function(x){
getMoreData(x, function(y){
getMoreData(y, function(z){
...
});
});
});
How do I replace this callback hell with observables? I found we can call observer.next() method in RxJS github - creating observable but couldn't figure out an implementation for this example.