【发布时间】:2018-11-10 18:07:52
【问题描述】:
给定以下代码
function triggerAction() {
const asyncAction$ = of("value1");
asyncAction$
.clientLogin()
.pipe(
first(),
tap(val => console.log(`Test: ${val}`)),
)
.subscribe();
}
我需要退订吗?以前,当 first 与修补运算符一起使用时,一旦发出第一个事件,它们就会自行取消订阅,但从文档中并不清楚管道运算符等效项是否相同。
https://www.learnrxjs.io/operators/filtering/first.html https://rxjs-dev.firebaseapp.com/api/operators/first
【问题讨论】:
标签: javascript rxjs