Running the Code Examples

The code examples in this book are made for either the browser or Node.js. The context of the code should clarify in what environment to run the code.

Running RxJS Code in the Browser

Although we could include a minified RxJS library directly in an HTML page by using a <script> tag and it would work for simple code, it would eventually complicate things when we start using ES6 in our code, which RxJS5 encourages. This is because we can’t count on all browsers to understand the complete ES6 syntax, especially when we import modules. If you still want to simply import RxJS directly in an HTML page, it is advised that you use a CDN like unpkg,[3] in which you can import the entire RxJS library already minified.

The ...

Get Reactive Programming with RxJS 5 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.