
Learn how to use RxJS to build reactive applications by exploring streams and observables, mastering a wide operator catalog, error handling, subjects, and a centralized store pattern through practical examples.
Set up a complete rxjs in practice development environment—install node and npm, optionally git and a code editor, clone the course repo, and learn the rxjs observable pattern and operators.
Explore how rxjs models asynchronous data as streams of values, including clicks, intervals, and timeouts, and learn which streams complete versus multi-value streams.
Explore how RxJS simplifies combining streams of values and avoids callback hell, and learn what RxJS is, when to use it, and the observable concept.
Explore how rxjs observables define streams, how interval and timer create observable blueprints, and how subscribing reveals numbers and events in the console.
Explore how RxJS observables emit values, handle errors, and complete through subscribe callbacks. Learn to manage subscriptions and cancellations by unsubscribing to control streams.
Build a custom http observable with observable.create, subscribe to fetch data from a rest api on port 9000, and transform the json payload of courses using map.
Learn how the RxJS map operator transforms an Http observable payload into a courses array using pipe, map, and a reusable Http observable utility.
Learn to build rxjs-based components by deriving beginner and advanced course lists from a single http observable, avoid callback hell, and adopt reactive design over imperative subscribe patterns.
Refactor a component to a reactive design by deriving two observables (beginner and advanced courses) from a single http observable and using the async pipe in the template.
Explain how the shareReplay operator in RxJS shares a single http observable across multiple subscribers, preventing duplicate http requests and using tap for logging.
Learn how to concatenate observables with the concat operator, emit values sequentially, and understand completion before subscribing to the next source, illustrated with marble diagrams.
learn to implement a form draft pre-save by joining a form value observable with a backend save observable using rxjs filter and concatenation through concatMap, avoiding nested subscribes.
Demonstrate the RxJS concatMap operator by mapping form changes to back-end HTTP put call, creating a derived observable and concatenating it to preserve order and safe sequencing.
Explore the merge strategy for combining observables by subscribing to multiple streams in parallel, emitting values as they arrive, finishing only when all streams complete, and propagating errors immediately.
Explore the mergeMap operator in rxjs, mapping each source value to a new observable and emitting results in parallel for http requests, while contrasting with concatMap for ordered saves.
Explore how the exhaustMap operator prevents multiple parallel save calls by ignoring new save clicks while a backend request is ongoing, unlike concatMap.
Learn how to implement a cancellable http observable in RxJS using an abort controller to cancel in-flight fetch requests on unsubscribe, with a search example and a cancelable interval.
Learn to implement a typeahead search for course lessons using the switch map operator in the course component, including http fetching of the course and its lessons via observables.
Learn to implement a typeahead by debouncing input with debounceTime, removing duplicates with distinctUntilChanged, and routing stable queries to the backend using switchMap.
Transform the search term stream into backend requests with switchMap, canceling ongoing searches. Concatenate the initial lessons with search results to deliver a seamless flow.
Explore RxJS error handling by catching errors, recovering with an alternative value via catchError and the of operator, and retrying failed observables.
Explore rxjs error handling with catch and rethrow, implement http observable error checks using the ok flag, and apply finalize for cleanup across multiple subscriptions.
Learn how to implement a retry when error handling strategy in rxjs, waiting two seconds between failed http requests and retrying until success.
Refactor the course component with the startWith operator to initialize the search stream with an empty string, triggering the initial lesson fetch and reducing code.
Compare throttling and debouncing in RxJS, explore throttle and throttle time operators, and apply them to typeahead and streaming data to control output rate.
Create a custom rxjs operator called the debug operator that logs messages at selectable levels and passes through the source observable to aid debugging.
Implement a custom rxjs debug operator with a private logging level and enum of trace, debug, info, and error to conditionally print messages to the console.
Master the RxJS forkJoin operator by triggering course and lessons http requests in parallel and emitting a tuple of the course and lessons once both complete.
Kick off a new section on RxJS in practice by building a custom centralized store from scratch, using RxJS subjects (plain, behavior, replay) and related operators.
Explore rxjs subjects as both observer and observable, and compare them with standard observable creation. Learn multicasting with a subject and deriving observables from it.
Discover how behavior subject remembers the last emitted value and delivers it to late subscribers, starting with an initial value for early subscribers and enabling a store-like data flow.
Explore async subject and replay subject in RxJS, learning how an async subject emits only the last value on completion, while a replay subject replays all values to late subscribers.
Design a centralized RxJS store using a BehaviorSubject to cache courses in memory, expose a courses observable, and prevent repeated HTTP requests across routes, via an Angular service.
Load initial data at app startup via the store, fetch courses from the backend, emit them through a courses observable, and provide selectors for beginner and advanced courses.
Implement optimistic data modification in a BehaviorSubject store by adding a save course operation that updates in memory, broadcasts changes, and persists via HTTP put.
Refactor the course component to fetch course data from the in-memory store using a new select course by id selector, replacing backend requests. Introduce RxJS operators for store-derived observables.
Learn how to force completion of long running observables using RxJS first and take operators, enabling forkJoin to emit results from a course observable and its derived streams.
Demonstrates the withLatestFrom operator in RxJS to combine a long-running course observable with a backend lessons observable, producing a [lessons, course] tuple for reactive data flows.
This conclusion highlights core rxjs concepts—streams, observables, and operators. It demonstrates building reactive components with async pipes, a centralized store, and robust error handling.
This Course in a Nutshell (note: this course includes the Typescript Jumpstart E-Book)
This course is a complete practical guide for the RxJs library (Reactive Extensions for Javascript).
If you are a developer just getting started with the Angular ecosystem, or even if you already have some experience with it, the part that you will find the hardest to wrap your head around is RxJs.
And this is because RxJs and Reactive Programming have a steep learning curve that makes it hard to just jump in into an existing program and learn these concepts by example. With RxJs that approach will simply not work. Instead, we need to start at the beginning and learn some baseline reactive design concepts first.
In this course, we will start by presenting a couple of baseline concepts, and then we will provide you with an extended catalog of RxJs operators that will in practice cover the vast majority of your daily needs.
Also, the goal here is not to cover every single operator, but instead to choose an extended subset that contains the most commonly used operators, and provide practical examples for each.
Another goal of the course is to show how RxJs is meant to be used for building programs using Reactive Design as opposed to an imperative programming style.
Course Overview
We will start by quickly introducing RxJs: we will cover the notions of Stream and Observable, and we will answer common questions such as: what is RxJs, when to use it and why, what problem does it solve?
We will then write our own Observable from first principles: we will implement our own HTTP observable that will allow us to handle backend HTTP requests while supporting error handling and cancellation.
After this quick introduction, we will dive straight into the practical examples covering a large variety of operators. We will cover the operators by explaining their behavior using the official RxJs marble diagrams, and then we will complement that with a practical example.
We will first start with the Map and Filter operators, and quickly move to more complex operators such as shareReplay, concat, concatMap, and other commonly used observable combination strategies such as: merge and mergeMap, exhaustMap, switch and switchMap. We will provide practical examples for these operators that include backend save operations and search typeaheads.
We will then cover several RxJs error handling strategies, like catch and recover, catch and rethrow or retry.
We will also cover the notion of subject and give examples of several commonly used subjects, such as BehaviorSubject or AsyncSubject. We will then use a subject to implement a very commonly used reactive pattern: we will implement a centralized observable store from first principles.
We will also cover many other commonly used operators, that include but are not restricted to: withLatestFrom, forkJoin, take, first, delay, delayWhen, startWith, etc.
At the end of the course, we will implement our own custom pipeable operator from first principles: we will implement a debugging operator that is going to be very helpful for debugging our RxJS programs.
What Will You Learn In this Course?
By taking this course you will learn how to use the RxJs library in practice for building applications in reactive style. You will understand well the core notions that are the basis of reactive programming, such as Streams and Observables.
You will also be familiar with an extended subset of operators that in practice will provide all that you will need for building applications in reactive style using RxJs.
Have a look at the course free lessons below, and please enjoy the course!