RxJS Observable-switch && Switchmap

Source: Internet
Author: User

  1. "Switch" subscribes to the Observable that emits observables, also known as a Higher-order Observable.
    Explanation: "That emits observables" as a modifier clause in front of "an Observable".

  2. Each time it observes one of these emitted inner observables,
    The output Observable subscribes to the inner Observable and begins emitting the items emitted by.
    Explanation: "The output Observable subscribes to the inner Observable and begins emitting the items emitted by that." The spelling of the completion should be:
    "The output Observable subscribes to the inner Observable and (the output) begins emitting the items emitted by (the inner Observable). "That" is "the inner Observable".

  3. Returns an Observable, emits items based on applying a function so you supply to each item emitted by the source Obs Ervable, where the function returns an (so-called "inner") Observable.
    In three stages:
    First stage: Returns an Observable that (1. Blah, blah, blah ...);
    Explanation: Return a observable
    Phase II: Returns an Observable that emits items (2. Blah, blah, blah ...) emitted by the source Observable
    Explanation: Returns a observable that will emits items.
    These items are emited from the source Observable.
    (description is two-layer Observable, i.e. Higher-order Observable)
    Stage Three: (2. Blah, blah, blah ...) the segment referred to in the paragraph: based on applying a function so you supply to each item
    Explanation: Each item in the second stage is processed by the function you provided (custom)

RxJS Observable-switch && Switchmap

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.