随笔分类 -  RxJS

上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要:Check the playground. 阅读全文
posted @ 2019-06-03 03:40 Zhentiw 阅读(503) 评论(0) 推荐(0) 编辑
摘要:JavaScript has multiple APIs that use callback functions that all do nearly the same thing with slight variations. Event listeners, array methods such 阅读全文
posted @ 2019-04-06 20:53 Zhentiw 阅读(334) 评论(0) 推荐(0) 编辑
摘要:When subscribers create new "inner" sources and subscriptions, you run the risk of losing control of them when the outer subscriber unsubscribes. This 阅读全文
posted @ 2018-09-29 03:50 Zhentiw 阅读(172) 评论(0) 推荐(0) 编辑
摘要:Unlike mergeMap and switchMap, concatMap focuses on when "inner" subscriptions "complete" by using a "buffer". Each time concatMap receives a value, i 阅读全文
posted @ 2018-09-29 03:46 Zhentiw 阅读(187) 评论(0) 推荐(0) 编辑
摘要:switchMap is mergeMap that checks for an "inner" subscription. If the "inner" subscription exists, switchMap unsubscribes from that "inner" subscripti 阅读全文
posted @ 2018-09-27 19:21 Zhentiw 阅读(169) 评论(0) 推荐(0) 编辑
摘要:Understanding sources and subscribers makes it much easier to understand what's going on with mergeMap under the hood. Where a typical operator invoke 阅读全文
posted @ 2018-09-27 19:18 Zhentiw 阅读(306) 评论(0) 推荐(0) 编辑
摘要:Instead of writing complex operators, it's usually best to write simple, single-purpose operators then chain them together when necessary. The pipefun 阅读全文
posted @ 2018-09-27 18:05 Zhentiw 阅读(230) 评论(0) 推荐(0) 编辑
摘要:While it's great to use the RxJS built-in operators, it's also important to realize you now have the knowledge to write them by yourself if needed. Th 阅读全文
posted @ 2018-09-27 17:53 Zhentiw 阅读(187) 评论(0) 推荐(0) 编辑
摘要:With knowledge of extending Subscriber and using source.lift to connect a source to a subscriber, you can now create your own operators by writing fun 阅读全文
posted @ 2018-09-26 01:51 Zhentiw 阅读(188) 评论(0) 推荐(0) 编辑
摘要:The lift method on each source hides away the internals of RxJS so you can simply connect a source to the subscriber you're working with. The lift met 阅读全文
posted @ 2018-09-26 01:42 Zhentiw 阅读(316) 评论(0) 推荐(0) 编辑
摘要:A Promise invokes a function which stores a value that will be passed to a callback. So when you wrap a Promise with an Observable, you'll always get 阅读全文
posted @ 2018-07-19 18:07 Zhentiw 阅读(435) 评论(0) 推荐(0) 编辑
摘要:You most likely already have data or properties in your template which are controlled by third-party components or updated using data binding. You can 阅读全文
posted @ 2018-07-18 20:03 Zhentiw 阅读(895) 评论(0) 推荐(0) 编辑
摘要:domStreams enable you to pass additional data along the stream that can be provided by the template (such as data coming from a v-forrendering of an A 阅读全文
posted @ 2018-07-18 19:53 Zhentiw 阅读(411) 评论(0) 推荐(0) 编辑
摘要:Streams give you the power to handle a "pending" state where you've made a request for data, but the data hasn't yet returned. You can leverage this p 阅读全文
posted @ 2018-07-18 19:46 Zhentiw 阅读(422) 评论(0) 推荐(0) 编辑
摘要:Splitting a stream into multiple streams causes new subscriptions. You can think of new subscriptions as "invoking a function". So if your original st 阅读全文
posted @ 2018-07-18 18:50 Zhentiw 阅读(208) 评论(0) 推荐(0) 编辑
摘要:Wrapping the creation of an Observable inside of a Function allows you delay the creation of the Observable until it is needed. This becomes really im 阅读全文
posted @ 2018-07-18 01:43 Zhentiw 阅读(509) 评论(0) 推荐(0) 编辑
摘要:When an image fails to load, it triggers an error event. You can capture the error event and merge it with your image loading stream to provide a back 阅读全文
posted @ 2018-07-18 01:37 Zhentiw 阅读(363) 评论(0) 推荐(0) 编辑
摘要:You can map remote data directly into your Vue.js templates using RxJS. This lesson uses axios (and the vue-axios library which exposes axios on compo 阅读全文
posted @ 2018-07-17 20:18 Zhentiw 阅读(672) 评论(0) 推荐(0) 编辑
摘要:The domStreams component property enables you to access Events from your Vue.js templates as Streams insides your subscriptions function. You can then 阅读全文
posted @ 2018-07-17 19:57 Zhentiw 阅读(364) 评论(0) 推荐(0) 编辑
摘要:When you want to get the current value of a subject, you need to switch BehaviorSubject, it always emit the latest value or throw error. Then you can 阅读全文
posted @ 2018-07-17 02:11 Zhentiw 阅读(312) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
点击右上角即可分享
微信分享提示