随笔分类 -  RxJS

上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要:The way we use publish() (or multicast with an RxJS Subject) makes the shared Observable not reusable if the shared execution happens to complete or e 阅读全文
posted @ 2016-10-26 18:19 Zhentiw 阅读(324) 评论(0) 推荐(0)
摘要:Because using multicast with a new Subject is such a common pattern, there is a shortcut in RxJS for this: the publish() operator. This lesson introdu 阅读全文
posted @ 2016-10-23 02:19 Zhentiw 阅读(420) 评论(0) 推荐(0)
摘要:With the connect() method on a ConnectableObservable, the programmer is responsible for avoiding leaked executions of shared RxJS Observables. This le 阅读全文
posted @ 2016-10-23 02:05 Zhentiw 阅读(203) 评论(0) 推荐(0)
摘要:ConnectableObservable has the connect() method to conveniently dictate the start of the shared execution of the source Observable. However, we need a 阅读全文
posted @ 2016-10-22 03:41 Zhentiw 阅读(231) 评论(0) 推荐(0)
摘要:We have seen how Subjects are useful for sharing an execution of an RxJS observable to multiple observers. However, this technique requires some labor 阅读全文
posted @ 2016-10-19 22:09 Zhentiw 阅读(473) 评论(0) 推荐(0)
摘要:This lesson will teach you about AsyncSubject, another type of Subject with some replaying logic inside. We will also look at some use cases for this 阅读全文
posted @ 2016-10-19 15:30 Zhentiw 阅读(222) 评论(0) 推荐(0)
摘要:A BehaviorSubject can remember the latest value emitted, but what if we wanted Observer B to see all the previous values emitted in the past? We can't 阅读全文
posted @ 2016-10-10 01:09 Zhentiw 阅读(410) 评论(0) 推荐(0)
摘要:When an Observer subscribe to a BehaviorSubject. It receivces the last emitted value and then all the subsequent values. BehaviorSubject requires that 阅读全文
posted @ 2016-10-05 19:13 Zhentiw 阅读(651) 评论(0) 推荐(0)
摘要:This lesson teaches you how a Subject is simply a hybrid of Observable and Observer which can act as a bridge between the source Observable and multip 阅读全文
posted @ 2016-10-05 18:49 Zhentiw 阅读(424) 评论(0) 推荐(0)
摘要:Marble testing is an expressive way to test observables by utilizing marble diagrams. This lesson will walk you through the syntax and features, prepa 阅读全文
posted @ 2016-08-22 00:05 Zhentiw 阅读(816) 评论(0) 推荐(1)
摘要:A ReplaySubject caches its values and re-emits them to any Observer that subscrubes late to it. Unlike with AsyncSubject, the sequence doesn't need to 阅读全文
posted @ 2016-08-18 17:52 Zhentiw 阅读(379) 评论(0) 推荐(0)
摘要:AsyncSubject emit the last value of a sequence only if the sequence completed. This value is then cached forever, and any other Observer that subscrib 阅读全文
posted @ 2016-08-17 02:24 Zhentiw 阅读(615) 评论(0) 推荐(0)
摘要:A Subject is a type that implements both Observer and Observable types. As an Observer, it can subscribe to Observables, and as an Observable it can p 阅读全文
posted @ 2016-08-15 19:57 Zhentiw 阅读(243) 评论(0) 推荐(0)
摘要:JSONP—or JSON with padding—is a sneaky technique that web developers came up with to work around the browser restrictions when requesting data from th 阅读全文
posted @ 2016-08-14 18:54 Zhentiw 阅读(288) 评论(0) 推荐(0)
摘要:Sometime, we migth just want to return a object which wrap into Observable. You can use 'just' or 'return'. 阅读全文
posted @ 2016-08-13 22:49 Zhentiw 阅读(224) 评论(0) 推荐(0)
摘要:Improving our mouse drag event Our mouse drag event is a little too simple. Notice that when we drag around the sprite, it always positions itself at 阅读全文
posted @ 2016-07-01 02:50 Zhentiw 阅读(398) 评论(0) 推荐(0)
摘要:Single, race both get only one emit value from the stream. Single(fn): race(...observable): Observable 阅读全文
posted @ 2016-06-05 22:29 Zhentiw 阅读(323) 评论(0) 推荐(0)
摘要:Operator repeat() is somewhat similar to retry(), but is not for handling operators. In this lesson we learn how repeat works. 阅读全文
posted @ 2016-05-31 19:47 Zhentiw 阅读(475) 评论(0) 推荐(0)
摘要:Most of the common RxJS operators are about transformation, combination or filtering, but this lesson is about a new category, error handling operator 阅读全文
posted @ 2016-05-31 19:41 Zhentiw 阅读(359) 评论(0) 推荐(0)
摘要:Operator distinct() and its variants are an important type of Filtering operator. This lessons shows how they work and in what cases are they useful. 阅读全文
posted @ 2016-05-30 21:13 Zhentiw 阅读(674) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页