combineLatest deprecated in favor of static combineLatest

懵懂的女人 提交于 2019-12-01 14:56:37

Update: Please refer to ofir fridman's answer


I found an answer in this article titled: RxJS 6: What's new and what has changed? ( which comes from official docs):

The solution is to convert:

import { combineLatest } from 'rxjs/operators';

a$.pipe(combineLatest(b$, c$));

into:

import { combineLatest } from 'rxjs';

combineLatest(a$, b$, c$);

In rxjs 6.5

import { combineLatest } from 'rxjs';
combineLatest([a$, b$, c$])

rxjs version 6.4.0

and you should import map operator from RxJs operators and it will be work

combineLatest(a$, b$, c$).pipe(map([a, b, c]) => treat(a, b, c))
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!