How Angular Signals and RxJS Work Together

preview_player
Показать описание
Common questions I hear when talking about signals involve RxJS.
"Do signals replace RxJS?" "Is RxJS going away?" "How do signals work with RxJS?"

To answer these questions, let's take an Angular application that uses RxJS and modify it to include signals. We'll look at creating signals from Observables, and binding to those signals. And we examine techniques for reacting to a signal in an Observable pipeline.

This video assumes you have a basic knowledge of signals, the new feature in Angular v16. Signals provide more reactivity and finer control over change detection. If you aren't familiar with signals, consider watching my introductory signals video first. You can find the link below.

NOTE: The Angular team announced that they will be changing (possibly later this week):
fromObservable 👉 toSignal
fromSignal 👉 toObservable

*Links*

*Content*
00:00 How do signals work with RxJS?
00:50 Sample Angular + RxJS application in action
01:23 Updating to Angular v16 next
02:20 Retrieving data with RxJS
04:00 Binding to signals
04:07 Creating a signal from an Observable
06:07 What does fromObservable() do?
06:28 Binding to signal containing the retrieve data
07:09 Running to validate our changes
07:37 Reacting to user actions with a signal (instead of a Subject)
10:08 Reacting to a signal in an Observable pipeline using fromSignal
11:25 Referencing a signal in a component
11:53 Using computed signals
12:56 Binding to signals
15:04 Running to validate our changes
15:23 Clearly defining signals for data we want tracked
15:56 Observables and Signals play well together

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator. I speak at conferences such as VS Live and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 10,000+) over the past 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular #signals #bestpractices #angularsignals #signalsinangular #demo #signaltutorial #angular16 #rxjsandsignals #signalsandrxjs
Рекомендации по теме
Комментарии
Автор

I don't know if its your pace, or your depth of knowledge, but I find your videos very easy to take in. You have a real talent for conveying highly technical information into consumable content.

richnimbu
Автор

You were born to be a teacher. I just thank God for the Internet that allows you to reach thousands of students. Thank you for another amazing video!!! Subscribed.

TampaCEO
Автор

I loved your analogy of "we need to open the box" Great way to remember that step

ianvink
Автор

Using signals instead of observables in a component solves one of the biggest problems associated with observables: accessing the observable's value synchronously within the component. Thanks for the video!

hakobmshecyan
Автор

Very nice video on signal and Rxjs, the best part is you take the problems practically and cover all the scenarios. Thanks for doing this video.

rkumar.lnct
Автор

Awesome, Deborah! Just wanted to say anyone who's has experience with Knockout JS should find it easier to grasp Angular Signals - they follow similar concept.

everyonesview
Автор

You're brilliant as always. Thanks Deborah!

davidjustice
Автор

Thanks for this, Deborah! I've been looking for a video that describes in simple terms how and where to combine RxJS and signals, and you've done a great job of that here! Appreciate the time and energy that you put into this!!

jamienordmeyer
Автор

How glad I am that I found this channel. Now this is my mecca of knowledge))

demidovmaxim
Автор

Thx a lot, Deborah! You are an excellent teacher! ❤

dixavier
Автор

Great video with a great use case throughout. I think fromObservable is now toSignal and fromSignal is now toObservable in the angular/core/rx-interop.

XinWongDigital
Автор

Marvelous! I cannot wait to share with my team!

bradkovach
Автор

Great Video. All my questions got answered.

justflying
Автор

Deborah, you are sooo good! Thank-you

dougl
Автор

Hi, as always great video with great explanation.
One or two things that i would like you to show is / are :
- template driven form with signals and if possible with reactive forms as well.
- component child: input and output with signals

Thanks

jediampm
Автор

please more videos!!
thank you so much!!!

Edmundo_Rivero
Автор

It wasn't just good, it was fantastic. 😍👌👏

erfanfarhadi
Автор

Thanks for this video and the rest in your series. They are great!! Do you have an example of using Signals with a POST method that has a request body?

rebeltrooper
Автор

Donno if my concept is correct or not:
- The Signals are useful to simplify the data flow providing (Provider)
- The Observables must be used to catch and work with data (Worker)
The Observable must be hidden to the component which uses to listen to data changes only (Signals).
In this video you didn't focus a lil part about error handling.
However really great work and explaination skills!!

TheZukkino
Автор

Great content !!
Suggestion: Video about the replacement of the behaviorSubject in a service by a signal

souhaibkhadraoui