DEV Community

Cover image for 3 things you need to know about RxJS
Lorenzo Zarantonello for This is Learning

Posted on • Updated on • Originally published at

3 things you need to know about RxJS

This post is a super brief summary of the RxJS fundamentals. If you are interested in RxJS, read the complete article on Medium, where I added a short example.

But first, let's dive into the three things you need to know about RxJS.

1. RxJS is a JavaScript library

RxJS stands for Reactive Extensions for JavaScript.

According to the official documentation, "RxJS is a library for composing asynchronous and event-based programs by using observable sequences".

In other words, RxJS is a library that helps us manage and manipulate data over time.

2. RxJS offers some advantages over Promises

RxJS offers several advantages compared to traditional techniques like Promises. Here are two key advantages:

  • RxJS can produce multiple values over time
  • Unlike Promises, it is possible to cancel async operations before they terminate

3. RxJS share some principles with Reactive Programming

Reactive programming is simply programming with asynchronous data streams. Anything can be a stream: variables, user inputs, data structure, etc. Therefore, it is possible to listen to the stream and react appropriately.

When we combine the functional paradigm with reactive programming we want to dynamically specify the behavior of values when we declare them.

Thanks to RxJS operators, we get a set of tools to merge, filter, and manipulate data streams.

Being a very short intro, there are no examples nor code. But at least you have some idea about RxJS. If you are interested, learn more about RxJS.

Top comments (2)

greggcbs profile image

But is it worth knowing?

lorenzojkrl profile image
Lorenzo Zarantonello

If you want to go in Angular, yes.
Otherwise, most likely you can skip.