實用技巧

這些教學示範了非常實用的技巧,建議多看幾次,好好記住。

Watch User Created Playlist (4)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

Returning subscriptions from the subscribe function

P

Creation operator: of()

P

Creation operators: from, fromArray, fromPromise

P

Refactoring tip: no empty lines inside a function

P
rx tutorial about Returning subscriptions from the subscribe function

Returning subscriptions from the subscribe function

3:14 rx PRO

So far, when writing these subscribe functions, we haven't returned anything. It is possible return an unsubscribe function from a subscribe function. In this lesson we will see how to allow observers to subscribe and unsubscribe from an Observable.

rx tutorial about Creation operator: of()

Creation operator: of()

2:06 rx PRO

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 creation operator: of().

rx tutorial about Creation operators: from, fromArray, fromPromise

Creation operators: from, fromArray, fromPromise

3:41 rx PRO

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 should have a way of transforming arrays into Observables. This lesson teaches how you can convert from Arrays to Observables, from Promises to Observables, and from Iterators to Observables.

js tutorial about Refactoring tip: no empty lines inside a function

Refactoring tip: no empty lines inside a function

5:00 js PRO

To keep code elegant and readable, this lesson presents a refactoring technique consisting of two rules: (1) Don't have empty lines in a function, (2) keep the function short, with at most 6 or 8 statements. See how this can help keep each function focused on one responsibility.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?