Jumping into RxJS

Let's take a look at how RxJS can be used in two simple examples. We'll use the same HTML page for these and other examples that appear in the first part of this chapter. For each demo, we'll modify the JavaScript script that executes. First, let's set up the HTML page and then observe how a simple Observable.Return and Subscribe works.

Libraries Included with RxJS

Since RxJS is a fairly large library and JavaScript developers are often concerned with the size of the code being sent to the browser, RxJS is split up into several pieces. Rx.js is the main library, and contains most of the operators and classes that are thought of as “Rx-proper.” The Joins library (“When,” “And,” “Then”) is split into its own file called rx.joins.js ...

Get Programming Reactive Extensions and LINQ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.