RXJS 5 .subscribe() 不带参数 [英] RXJS 5 .subscribe() without arguments

查看:20
本文介绍了RXJS 5 .subscribe() 不带参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以一个快速的问题.我已经使用 RxJS 5 几个月了,我遇到了一些我不太了解的行为,因为我无法在任何地方查找它.

So a quick question. I've been using RxJS 5 for a few months now, and I've run into a bit of behavior that I don't really understand, as I haven't been able to look it up anywhere.

我的情况是,使用简单的 .subscribe(); 订阅可观察链不会触发可观察.

I'm in a situation where subscribing to an observable chain with simply .subscribe(); doesn't trigger the observable.

但是,如果我添加一个 onNext 回调(是否为空),可观察触发器和链处理:.subscribe(() => {});

However, if I add an onNext callback (empty or not), the observable triggers, and the chain processes: .subscribe(() => {});

谁能解释为什么会发生这种行为?

Can anyone explain why this behavior happens?

推荐答案

感谢 Damian Hercun 告知这是 RxJS 5.4.2 中现已修复的错误.

Thanks to Damian Hercun for informing that this was a now-fixed bug in RxJS 5.4.2.

信息:

https://github.com/ReactiveX/rxjs/pull/1935

https://github.com/ReactiveX/rxjs/issues/1921

这篇关于RXJS 5 .subscribe() 不带参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆