Skip to content

Latest commit

 

History

History
26 lines (14 loc) · 1.86 KB

File metadata and controls

26 lines (14 loc) · 1.86 KB

RxJs

RxJs has a steep learning curve. To begin with, it's best to focus on a few operators and then expand from there.

If you master map, switchMap, filter, and take, you'll be on a good path. But, you'll quickly find that your project requirements will affect what you need to learn next.

As well as processing Observable streams such as HttpClient Requests, you'll need to create your own streams. Begin with BehaviorSubjects - they're a natural fit for simple state management in Services.

Rule:

  • If you must subscribe to an Observable in your Component, always remember to Unsubscribe or use another method to complete the Observable before the Component is destroyed. Otherwise - memory leaks!

Links

The Angular docs have a nice short intro to RxJs: https://angular.io/guide/rx-library

Reactive Programming

Once you've got the hang of Observables, Reactive Programming is the next important step. Done right, it makes your Component code look simpler and it makes your application render faster.

Links