Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

Save time avoiding common mistakes using RxJS

via egghead.io

Overview

Note: RxJS imports have changed since the publication of this course. Operators now must be passed into .pipe to be applied to an observable.
In this course we will learn to identify common mistakes with RxJS that usually make code harder to read and even introduce bugs. Most of these mistakes are related to Subject, subscribe, and subscriptions. We are going to see how to use only Observables and convenient operators made for solving those mistakes, such as fromEvent, takeUntil and switchMap. By the end of this course, you will have a more immediate intuition on what patterns are simple and safe in RxJS.

Syllabus

  • Convert RxJS Subjects to Observables
  • Replace Observable.create with Observable creation helpers
  • Use takeUntil instead of manually unsubscribing from Observables
  • Convert an underlying source of data into an Observable
  • Use the map operator instead of firing events on a Subject
  • Use flattening operators instead of nested subscriptions
  • Use switchMap to avoid leaks when flattening
  • Replace zip with combineLatest when combining sources of data
  • Move important side effects from do() to subscribe()
  • Implement pause and resume feature correctly through RxJS
  • Know when to extend the Observable class
  • Make Observables hot only where necessary

Taught by

André Staltz

Reviews

4.6 rating at egghead.io based on 198 ratings

Start your review of Save time avoiding common mistakes using RxJS

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.