随笔分类 -  RxJS

上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要:So far, when writing these subscribe functions, we haven't returned anything. It is possible return an unsubscribe function from a subscribe function. 阅读全文
posted @ 2016-04-17 23:36 Zhentiw 阅读(189) 评论(0) 推荐(0)
摘要:We have been using Observable.create() a lot in previous lessons, so let's take a closer look how does it work. The create function: In deep, create() 阅读全文
posted @ 2016-04-17 16:58 Zhentiw 阅读(192) 评论(0) 推荐(0)
摘要:It is quite common to need an Observable that ticks periodically, for instance every second or every 100 miliseconds. We will learn about operators in 阅读全文
posted @ 2016-04-17 16:43 Zhentiw 阅读(365) 评论(0) 推荐(0)
摘要:This lesson introduces operators empty(), never(), and throw(), which despite being plain and void of functionality, are very useful when combining wi 阅读全文
posted @ 2016-04-14 01:06 Zhentiw 阅读(241) 评论(0) 推荐(0)
摘要:Besides converting arrays and promises to Observables, we can also convert other structures to Observables. This lesson teaches how we can convert any 阅读全文
posted @ 2016-04-14 00:57 Zhentiw 阅读(497) 评论(0) 推荐(0)
摘要:The of() operator essentially converted a list of arguments to an Observable. Since arrays are often how we structure list of things in JavaScript, we 阅读全文
posted @ 2016-04-14 00:45 Zhentiw 阅读(628) 评论(0) 推荐(0)
摘要:RxJS is a lot about the so-called "operators". We will learn most of the important operators, one by one. In this lesson, we will see our first creati 阅读全文
posted @ 2016-04-11 02:18 Zhentiw 阅读(202) 评论(0) 推荐(0)
摘要:The Observer object has the functions next() and error(). In this lesson we will see the other (and last) function available on observers, complete(), 阅读全文
posted @ 2016-04-10 23:27 Zhentiw 阅读(349) 评论(0) 推荐(0)
摘要:Whenever we are writing code, we need to remember that things may go wrong. If an error happens in a function, that error will be thrown. Errors can a 阅读全文
posted @ 2016-04-10 00:30 Zhentiw 阅读(352) 评论(0) 推荐(0)
摘要:Get a better understanding of the RxJS Observable by implementing one that's similar from the ground up. 阅读全文
posted @ 2016-03-17 02:51 Zhentiw
摘要:This lesson covers how to toggle an observable on and off from another observable by showing how to use a checkbox as a toggle for a stream of data.   阅读全文
posted @ 2016-03-15 21:15 Zhentiw
摘要:Get your code back on the happy path! This lesson covers a variety of ways to handle exceptions thrown by Observables in RxJS. Operators covered are: 阅读全文
posted @ 2016-03-15 03:14 Zhentiw
摘要:Last thing to do is clean the score box and input, also auto foucs on input when click start.       阅读全文
posted @ 2016-03-14 05:46 Zhentiw
摘要:A stream will run with each new subscription added to it. This lesson shows the benefits of using share so that the same stream can be shared across m 阅读全文
posted @ 2016-03-14 05:44 Zhentiw
摘要:While frameworks like Angular 2 and CycleJS provides great ways to update the DOM and handle subscriptions for you, this lesson shows how you can stil 阅读全文
posted @ 2016-03-13 21:27 Zhentiw
摘要:When you complete a stream, there’s no way to restart it, you must resubscribe. This lesson shows how repeat comes in handy to resubscribe after a str 阅读全文
posted @ 2016-03-13 21:16 Zhentiw
摘要:This lesson shows why it’s preferable to using withLatestFrom instead of combineLatest in certain scenarios. Timer will continue until you enter the n 阅读全文
posted @ 2016-03-12 18:36 Zhentiw
摘要:To help understand your stream, you’ll almost always want to log out some the intermediate values to see how it has progressed during its lifespan. Th 阅读全文
posted @ 2016-03-11 21:00 Zhentiw
摘要:When a stream has completed, you often need to evaluate everything that has happened while the stream was running. This lesson covers how to use reduc 阅读全文
posted @ 2016-03-11 20:55 Zhentiw
摘要:Subscribe can take three params: subscribe( (x)=> console.log(x), err=> console.log(err), ()=> console.log('complete') ); If we want to stop the proga 阅读全文
posted @ 2016-03-11 15:37 Zhentiw

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