This is just a learning blog post, check out the talk.

1. Custom pipeable operators:

Custom pipeable operator is just a high order function which return an observable.

const pow = (p: number) => (source: Observable<number>) => source.pipe(map(n => n ** p ))

source$.pipe(
filter(x => x > ),
pow()
).subscribe(x => console.log(x))

2. Error handling: Throw error asynclly:

badSource$.subscribe(nextFn. handlerError, completeFn)

3. Simpler import:

import {interval, of} from 'rxjs';
import {filter, mergeMap, scan} from 'rxjs/operators'; interval().pipe(
filter(x => x % === ),
mergeMap(x => of(x + , x + , x + m)),
scan((s, x) => s +x, )
).subscribe(x => console.log(x));

4. New operator: throwIfEmpty

const mustClick$ = buttonClick$.pipe(
takeUntil(this.viewResize$),
throwIfEmpty(
() => new Error('user did not click before resize')
),
);

5. If you want to migration to rxjs v6:

6. Update you code automatically:

最新文章

  1. Angular.js中使用$watch监听模型变化
  2. js对文本框特殊字符串过滤
  3. JavaScript基础--面向对象三大特性(八):继承封装多态
  4. docker-py的配置与使用
  5. [HIHO1174]拓扑排序&#183;一(拓扑排序)
  6. 更改Activity亮度
  7. NSFileHandle 和 NSFileManager的一些用法
  8. 用C#来查看电脑硬件和系统信息
  9. MediaInfo源代码分析 2:API函数
  10. .net core4
  11. Shortest Prefixes
  12. Error copying image in the datastore: Not allowed to copy image file
  13. mongodb 复制集
  14. webapi框架搭建-创建项目(二)-以iis为部署环境的配置
  15. 关于CS1061报错(XX不包含XXX的定义,并且找不到类型为XX的第一个参.....)的一种可能的解决的办法
  16. Visual Studio Code-批量在文末添加文本字段
  17. python入门学习:6.用户输入和while循环
  18. redis底层设计(五)——内部运作机制
  19. ES7/8新特性学习随笔
  20. SSE,MSE,RMSE,R-square指标讲解

热门文章

  1. PCB MS SQL 将字符串分割为表变量(表值函数)
  2. sublime如何汉化
  3. git clone 出现错误
  4. 利用 html+css 画同心圆(concentric circles)——绝对布局与相对布局
  5. Django学习案例一(blog):二. 连接数据库
  6. 青橙 M4 解锁BootLoader 并刷入recovery ROOT
  7. 【Oracle】Rman备份策略
  8. 【SQL】字符型函数
  9. SQL Server对数据进行删除
  10. php知识点(基本上文档都有,只为方便记忆)