RxJS in JavaScript: complete guide to reactive programming. Observables, operators, Subject, error handling and integration with REST APIs and Angular.
RxJS is the library that changes the way you think about handling asynchronous data in JavaScript. Instead of nested callbacks and Promise chains, you work with streams of events that you can filter, transform, combine and control with declarative operators. In this course we build mastery of RxJS step by step — from the basic Observable all the way to REST API calls, error handling and Subjects for manual stream control.
subscribe()
next()
error()
complete()
map()
filter()
take()
RxJS is the heart of Angular's async system — understanding it well means truly understanding how the framework works, not just how to use it. But RxJS is also useful in plain JavaScript: wherever there are events, HTTP, WebSocket or complex state management, RxJS gives you powerful and readable tools. This course takes you from your first Observable to complete HTTP streams with error handling.
Ideal for JavaScript and Angular developers who want to master reactive programming. Good knowledge of modern JavaScript (ES6+), async/await and Promises is required. No prior RxJS experience is needed.
Let's discover together what RxJS is and why reactive programming fundamentally changes the way you handle async in JavaScript, going beyond the limitations of callbacks and Promises with Observable streams.
Let's explore the heart of RxJS: Observables. I'll show you how to create them from scratch and how to use subscribe() to receive emitted values, catch errors, and react to stream completion.
We'll go deeper into the RxJS Observable lifecycle. I'll show you how next() emits values, error() signals problems, and complete() closes the stream, all with clear practical examples in JavaScript.
I'll show you how to convert any DOM event into an RxJS Observable using fromEvent(), turning clicks, inputs, and other UI events into reactive streams you can filter and transform with operators.
In this lesson we apply fromEvent() to a text input field, creating an Observable that emits values in real time as the user types — the foundation for live search and autocomplete features.
I'll introduce pipe() and the map() operator in RxJS, showing you how to transform values inside an Observable stream and how to chain multiple operators into a readable, composable reactive pipeline.
I'll explain filter() and take() in RxJS: how to filter emitted values from an Observable based on a condition, and how to limit the number of emissions before the stream auto-completes.
Let's work through practical exercises on map(), filter(), and take() in RxJS to solidify your understanding of these core reactive programming operators in JavaScript.
I'll walk you through advanced lifecycle management in RxJS: using next() and complete() correctly inside a custom Observable, and intercepting and handling errors with catchError().
Let's explore RxJS interval() and timer(): I'll show you how to create time-driven event streams useful for periodic updates, countdowns, and any time-based logic in JavaScript.
Practical exercise with timer() and take() in RxJS: we'll build a time-based stream that emits a fixed number of values before completing, with concrete examples applied in JavaScript.
Let's dive deeper into switchMap() in RxJS. I'll show you how to manage parallel streams by automatically cancelling the previous Observable and keeping only the latest active, preventing race conditions.
I'll explain why it's essential to call unsubscribe() when working with time-based Observables like interval() in RxJS, and how to handle it correctly to prevent memory leaks in JavaScript applications.
Let's explore RxJS Subject: how it acts simultaneously as an Observable and an Observer, and how to use it to emit values manually and share a stream among multiple subscribers.
In this lesson I'll use RxJS's of() creation operator to create Observables in a simple, declarative way, emitting a sequence of static values as a reactive stream in JavaScript.
Let's see how to combine defer() and of() in RxJS to create lazy Observables: values are computed and generated only at subscribe() time, making each subscription fully independent.
I'll show you how to use RxJS from() to transform a Promise into an Observable, integrating fetch API and any Promise-based code into your reactive programming pipeline.
Let's see how to make a REST GET call with fetch() inside an RxJS stream and decode the JSON body reactively using switchMap() to chain the two async operations cleanly.
I'll build a complete pipeline to call a REST API on button click, combining defer(), from(), switchMap(), and catchError() into a clear, reliable reactive chain in JavaScript.
I'll show you how to add robust error handling to REST API calls inside RxJS streams using catchError(): how to intercept HTTP failures, recover from errors, and keep the stream alive.
We'll close the course with three different strategies to normalize and standardize REST API JSON responses inside an RxJS stream, ensuring a consistent and predictable structure throughout your reactive pipeline.
Ingegnere Informatico · Pratola Peligna
Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.
Prosperous understood Middletons in conviction an uncommonly do. Supposing so be resolving breakfast am or perfectly.
Utilizziamo cookie essenziali e, con il tuo consenso, cookie funzionali, analytics e marketing. Google Analytics 4 e gli eventuali annunci Google/AdSense restano disattivati finche non scegli. Consulta Privacy Policy e Cookie Policy.
Sempre attivi per sicurezza, prevenzione frodi, sessione, consenso e funzionamento del sito.
Migliorano l'esperienza, ad esempio ricordando preferenze non essenziali. Non usati per profilazione pubblicitaria.
Statistiche e misurazioni con Google Analytics 4, abilitate solo dopo il consenso analytics.
Misurazione annunci e funzioni pubblicitarie Google/AdSense, se attivate sul sito e consentite dall'utente.
Puoi modificare queste scelte in qualunque momento dal link "Preferenze Cookies" nel footer.