Mohammad-Ali A'râbi

How to Create New RxJS Operators

Losing state in your RxJS streams? Learn to build custom operators that carry values through your pipeline, resulting in cleaner, more maintainable code.

How to Create New RxJS Operators
#1about 5 minutes

The history and evolution of ReactiveX and RxJS

ReactiveX originated at Microsoft to simplify concurrent programming and evolved into libraries like RxJava at Netflix and the widely used RxJS.

#2about 4 minutes

How pipeable operators changed the RxJS API

RxJS version 5.5 introduced the pipe function, decoupling operators from the observable object and enabling developers to create their own.

#3about 5 minutes

Addressing the challenge of long, unreadable pipelines

Using RxJS extensively in a Node.js backend led to long, unreadable pipelines, which were improved by extracting logic into named functions.

#4about 4 minutes

Preserving state in pipelines using tuples and zip operators

The flatZipMap operator was created to solve the problem of losing access to previous values in a stream by pairing results into a tuple.

#5about 6 minutes

Implementing custom operators with TypeScript generics

Creating a custom operator involves defining a function that returns an OperatorFunction with specific input and output types using TypeScript generics.

#6about 6 minutes

Advanced typing for complex custom operators

Complex operators like flatListFlatMap demonstrate how advanced TypeScript features like ObservableInput and ObservedValueOf are essential for correct type inference.

#7about 28 minutes

Q&A on testing, pitfalls, and contributing

The Q&A session covers unit testing custom operators, handling errors, key differences with RxJava, and how to contribute to open-source RxJS libraries.

Related jobs
Jobs that call for the skills explored in this talk.

Angular Developer

Picnic Technologies B.V.
Amsterdam, Netherlands

Intermediate
Senior

Featured Partners

Related Articles

View all articles
BR
Benjamin Ruschin
The HTML Elements That You’re Probably Over-Engineering
As frameworks have become more and more commonplace in the world of web development, so too has the over-engineering of features made possible by our humble old friend, HTML. The mental models that come with using state management in React, Vue and o...
The HTML Elements That You’re Probably Over-Engineering
BR
Benjamin Ruschin
What Developers Really Need to Create Great Code Demos
Every developer on earth has, at some point, had another developer to thank for a breakthrough, a success, an aha moment they wouldn’t have had without coming across that blog post, that open-source contribution, that reply on socials or that humble ...
What Developers Really Need to Create Great Code Demos
DC
Daniel Cranney
Dev Digest 159: AI Pipelines, 10x Faster TypeScript, How to Interview
Inside last week’s Dev Digest 159 . 🤖 How to use LLMs to help you write code ⚡ How much electricity does AI need? 🔒 Is your API secure? Learn all about hardening it… 🟦 TypeScript switches to go and gets 10 times faster 🖼️ An image cropper in your ap...
Dev Digest 159: AI Pipelines, 10x Faster TypeScript, How to Interview
DC
Daniel Cranney
Dev Digest 195: End of Likes, JavaScript’s a Zoo, and Messing with Bots!
Inside last week’s Dev Digest 195 . 👎 No more external likes 🤗 Needy programs 📉 The worst selling Microsoft product 🟨 JavaScript engines zoo 🍞 No more toasts! 🤖 Messing with bots 👔 Beware of fake job interviews 🗞️ Join over 150,000 developers alread...
Dev Digest 195: End of Likes, JavaScript’s a Zoo, and Messing with Bots!

From learning to earning

Jobs that call for the skills explored in this talk.

Programador Angular

Programador Angular

Apiux Tech
Municipality of San Sebastian, Spain

Remote
20-24K
Intermediate
Angular
Programador Angular

Programador Angular

Apiux Tech
Municipality of Granada, Spain

Remote
20-24K
Intermediate
Angular
Programador Angular

Programador Angular

Apiux Tech
Municipality of Santander, Spain

Remote
20-24K
Intermediate
Angular
Programador Angular

Programador Angular

Apiux Tech
Municipality of Almería, Spain

Remote
20-24K
Intermediate
Angular
Programador Angular

Programador Angular

Apiux Tech
Municipality of Santiago de Compostela, Spain

Remote
20-24K
Intermediate
Angular
Programador Angular

Programador Angular

Apiux Tech
Municipality of Las Palmas, Spain

Remote
20-24K
Intermediate
Angular
Programador Angular

Programador Angular

Apiux Tech
Municipality of Tarragona, Spain

Remote
20-24K
Intermediate
Angular