Angular πŸ‡ΊπŸ‡¦ - practical notes
1.63K subscribers
1.6K photos
1 file
532 links
Angular - practical notes

This group is for posting practical notes for Angular developers. Mostly all posts are for quick implementation https://t.me/angular_practical_notes (Commenting on posts only in ENG and UA langs here). Welcome!
Download Telegram
β™ŒοΈ Scheduler in RxJS

#rxjs #observeOn #asyncScheduler

One common scheduler in RxJS is the observeOn() operator. The observeOn() operator is used to specify the scheduler on which an observable should emit its values.

In this example, the from() function is used to create an observable that emits the values 1, 2, and 3. The observeOn() operator is then used to specify that the observable should emit its values on the async scheduler, which will cause the values to be emitted asynchronously. The asyncScheduler is a common scheduler in RxJS that schedules tasks to be executed asynchronously using setTimeout().


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1
β™ŒοΈ Multicasting in Angular

#angular #rxjs #share #publish #shareReplay

What is Multicasting?
Multicasting allows an observable to share its execution across multiple subscribers, so that all subscribers receive the same emitted data at the same time. By default, observables in RxJS are β€œunicast,” meaning each subscription creates a separate execution of the observable. This can lead to multiple API calls or side effects if several components subscribe to the same observable.

Multicasting ensures that only one execution occurs, regardless of how many subscribers are attached to the observable. This is particularly useful in scenarios where expensive operations (such as HTTP requests) should be shared across multiple components without being re-executed multiple times.


βœ… Article link
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5
πŸ€“ From RxJS to Signals

#angular #rxjs #signals

βœ… Article Link
πŸ‘7