Angular v16.0.0-rc.1 includes some important changes to RxJS interop with signals:
Renamed fromObservable and fromSignal
Changed how the fromObservable default works
Improved error handling
We take a look at these changes and apply them in a sample application.
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: Starting with Angular v19, using resource() and rxResource() are often a better choice than using toSignal(): • First Look at Angular's new resource() and...
Links
Angular Signals: What, Why, and How?: • Angular Signals: What? Why? and How?
How Angular Signals and RxJS Work Together: • How Angular Signals and RxJS Work Together
Sample code: https://github.com/DeborahK/Angular-S...
Content
00:00 Angular v16 Release Candidate 1 Update
00:43 Updating to Angular v16 RC 1
01:14 fromObservable is now toSignal and fromSignal is now toObservable
01:49 Creating a signal from an Observable with toSignal
02:03 Using toSignal with its default initial value (undefined)
02:47 Using toSignal with a custom initial value
03:45 Creating an Observable from a signal with toObservable
03:56 Error handling: Catching http errors when reading signals
05:28 Running to validate our changes
05:50 Validating our error handling
06:22 This brings the application up to date with RC 1
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊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).
Contact me on Twitter: / deborahkurata
Find my Pluralsight courses: https://www.pluralsight.com/profile/a...
Access my freeCodeCamp articles: https://www.freecodecamp.org/news/aut...
View my YouTube content: / @deborah_kurata
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular #signals #bestpractices #angularsignals #signalsinangular #demo #signaltutorial #angular16 #rxjsandsignals #signalsandrxjs