RXJS Best (& Bad) Practices for Angular Developers
The document outlines best and bad practices for using RxJS in Angular applications, emphasizing the importance of naming conventions, unsubscribing from observables, and handling errors. It covers essential concepts such as cold vs hot observables, pure functions, and various RxJS operators, along with tips for effective learning. Additionally, it highlights common mistakes and resources for further study.
Introduction to RXJS best and bad practices focusing on naming conventions and concepts.
Highlighting three main bad practices: use of '$' in observable names, subscribing in ngOnInit, and forgetting to unsubscribe.
Demonstrating another method for subscriptions using the async pipe in Angular templates.
Recommendations against passing streams to components and double subscriptions.
Emphasizing the importance of handling errors and introducing the concept of Subjects as Observables.
Importance of using pure functions and limiting logic within Observers.
Best practices for handling arrays using RxJS streams, with an example of Angular HTTP Interceptor.
Illustrating the integration of RxJS in various Angular features like directives, forms, and guards.Focus on NGRX for state management including dispatching actions and relevant effects.
Key RxJS concepts including Cold vs Hot observables, various operators, and their functionality.
Presenting resources and communities for further learning about RxJS and frontend training.
fabiobiondi.io
YOU SHOULD KNOWFOLLOWING CONCEPTS:
Cold vs Hot Observables
Unicast vs Multicast
Outer vs Inner observables
Pure Functions & Immutability
Think Async
Learn how to work with multiple streams