Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Reactive JavaScript

You're reading from   Mastering Reactive JavaScript Building asynchronous and high performing web apps with RxJS

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781786463388
Length 310 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Erich de Souza Oliveira Erich de Souza Oliveira
Author Profile Icon Erich de Souza Oliveira
Erich de Souza Oliveira
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. What Does Being Reactive Mean? FREE CHAPTER 2. Reacting for the First Time 3. A World Full of Changes - Reactive Extensions to the Rescue 4. Transforming Data - Map, Filter, and Reduce 5. The World Changes Too Fast - Operators to Deal with Backpressure 6. Too Many Sources - Combining Observables 7. Something is Wrong - Testing and Dealing with Errors 8. More about Operators 9. Composition 10. A Real-Time Server 11. A Real-Time Client

Installation of tools

Before we start to use reactive programming, we need to install the tools we will be using throughout this book.

Node.js

We will be using node version 6.9.1, the most recent LTS version of nodes at the time of writing. You can find versions of it for Windows, Mac, and Linux at the following link:

https://nodejs.org/en/download/releases/.

We are going to use a lot of arrow functions throughout this book, so we expect you to have familiarity with this ES6 feature. You can run the codes described here in any node version above 4.x.

bacon.js

In this first chapter of this book we will be using bacon.js , which is a library for functional reactive programming in JavaScript. This library works in both server and client. We will use it to introduce you to some concepts of functional reactive programming as it is easier to get started. We will be using version 0.7.88.

To install it on your server, just run the following command inside a node project:

    npm i baconjs@0.7.88 -save

To add it to an HTML page, just paste the following code snippet inside it:

<script src="https://cdnjs.cloudflare.com/ajax/libs/bacon.js/0.7.88/Bacon.min.js"> 
</script>
Don't worry with the version not being above 1.x; bacon.js is stable.

RxJS

The last tool we need to follow in this book is RxJS; we will use this library in later chapters. This library also runs in both client and server and we will be using version 4.1.0.

To install it on your server, just run the following command inside a node project:

    npm i rx@4.1.0 -save

To add it to an HTML page, just paste the following code snippet inside it:

<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.1.0/rx.all.js"> 
</script>
For those using other package managers, you can also install bacon.js and RxJS from Bower and NuGet.
You have been reading a chapter from
Mastering Reactive JavaScript
Published in: May 2017
Publisher: Packt
ISBN-13: 9781786463388
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime