From b0eb379abe8998b55f0f865d616c7826e6949204 Mon Sep 17 00:00:00 2001 From: kacan98 Date: Mon, 2 Sep 2024 10:35:18 +0200 Subject: [PATCH 1/2] Extend explanation of AsyncSubject --- subjects/asyncsubject.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subjects/asyncsubject.md b/subjects/asyncsubject.md index f718a27..4aac698 100644 --- a/subjects/asyncsubject.md +++ b/subjects/asyncsubject.md @@ -2,6 +2,8 @@ ## Emits its last value on completion +## Then it emits the last value to all subscribers after completion + [![Ultimate RxJS](https://ultimatecourses.com/static/banners/banner-rxjs.svg 'Ultimate RxJS')](https://ultimatecourses.com/courses/rxjs?ref=4) ### Examples @@ -26,6 +28,8 @@ sub.subscribe(console.log); sub.next(456); //nothing logged sub.complete(); //456, 456 logged by both subscribers + +sub.subscribe(console.log); //456 logged one more time ``` ### Additional Resources From aa994306b680addb98ab81a1da4851dbdf0e303e Mon Sep 17 00:00:00 2001 From: kacan98 Date: Mon, 2 Sep 2024 10:40:25 +0200 Subject: [PATCH 2/2] Update ref to Stackblitz --- subjects/asyncsubject.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subjects/asyncsubject.md b/subjects/asyncsubject.md index 4aac698..81fbe20 100644 --- a/subjects/asyncsubject.md +++ b/subjects/asyncsubject.md @@ -2,7 +2,7 @@ ## Emits its last value on completion -## Then it emits the last value to all subscribers after completion +## After completing, it sends the last value to all subscribers [![Ultimate RxJS](https://ultimatecourses.com/static/banners/banner-rxjs.svg 'Ultimate RxJS')](https://ultimatecourses.com/courses/rxjs?ref=4) @@ -11,7 +11,7 @@ ##### Example 1: simple AsyncSubject ( -[Stackblitz](https://stackblitz.com/edit/rxjs-asyncsubject?file=index.ts&devtoolsheight=100) +[Stackblitz](https://stackblitz.com/edit/rxjs-asyncsubject-xyp8ku?file=index.ts) ) ```js