Why didn't the Angular team just use RxJS instead of Signals?

preview_player
Показать описание

Angular is introducing a new reactive primitive to the framework called "signals", which have been a popular reactive implementation in other frameworks.

But, this begs the question: why didn't they just use BehaviorSubject which is already included in RxJS? This video explores that question.

0:00 Introduction
0:46 Signals are better
1:22 Accessing values
1:50 Derived values
3:47 The diamond problem
5:46 Side effects
7:04 Conclusion

#angular #signals #rxjs

Рекомендации по теме
Комментарии
Автор

Signal will be amazing in a component / presentation level and Observable will be amazing in a services / data transformation level. I think angular did a realy good job to combine the power of both.

lucasgiunta
Автор

Was very hesitant to use signals, and also a very avid user of rxjs, but you've outlined many obvious problems with rxjs that signals solve very easily. thank you!!!

craigiswayne
Автор

Thank you for always making quality videos which explain difficult subject in an easy to understand way. Can't wait to use signals in our product at work!

AllanLange
Автор

Very good and detailed explanation (with diagram, and example). Your videos answer my question what is different between this new Signals and the old traditional way RxJS. Hope to see more videos like this from you <3

dragonflyer
Автор

This video did a better job for me of explaining signals than the dedicated one! Thanks!

krzysztofprzybylski
Автор

Very nice description with the practical code examples. Nice one! Thanks!

FCHFlo
Автор

Great info Joshua! Thank you for clarifying signals with real examples vs RxJS. It looks they are easier

dusanjovanovski
Автор

As someone who is a huge fan of rxjs and tries to help jr devs at work write more reactive code, I love signals. It so simple to use and for people to understand after spending some time with it. I can't expect someone that's been working on Angular for a months to be as comfortable with rxjs as me whose been using it since Angular 2 first came out. Signals makes it so much easier to not fall back to the non reactive coding patterns that alot of jr devs usually do.

metax
Автор

Excellent presentation Josh ! There is a real hype around these Signals and it can only lead to better DX 🙂

AlainBoudard
Автор

Thank you very much for this video! Things like that will make it a lot easier to explain why we should switch to signals.

timonkrebs
Автор

thanks for outlining the gotchas, especially with observables, subscriptions, pipes, side effects, etc. Took me sometime to wrap my head around these "subjects" [pun], while also getting bitten along the way by those hidden traps. I'm sold here to signals, that as you've shown here: the simplicity, elegance while still being powerful.

dexterbt
Автор

This is the type of video/explenation that will be really helpful to get people hooked ❤

What I think is not made as clear: Signals are REALLY useful even for very experienced rxjs devs.

For example: Things like the solid dev tools for signals that can visualize the current (changeing) reactive graph in a way that is easy to understand, are simply not possible with rxjs. The non existance of the diamond problem and the synchronous mental model is so beneficial in many more ways than probably can be easily explained.

Signals have to be experienced to really be able to appreciate them🎉

timonkrebs
Автор

Very good and informative. I'm looking forward to getting stuck in to Angular 16

FrontendWizardry-zlhs
Автор

Always love watching your Angular content, especially when you cover new exciting topics! Personally I can't wait for the official release of signals, and I think they'll work hand in hand with rxjs. On a semi-related note, I was wondering if you've ever heard of or used the 'rxjs-observed-decorator' library, and if so I was wondering what your thoughts were on it.

garretpremo
Автор

Nice explanation! When I saw signal in the release notes I wasn't able to see the simplicity perspective that it's bring to table. Will be a way easier to introduce async programming with signal!

Автор

Thats exactly the video i needed to understand the purpose of these signals, thanks !

Czulu
Автор

Regardless of what's better I think RxJs helped me see a different way to write code, and this is not just specific to angular or javascript, I also work with Java where I was able to directly use my knowledge gained from using RxJs to work with reactive java. I believe other languages have similar concepts so it's definitely worth knowing and even though I believe I will mostly be using signals in the future I am not sorry that I had the opportunity to work with RxJs

nerminkarapandzic
Автор

Best explanation for signals I found on youtube 👏

tariq.angular
Автор

Will explained! Thanks again for the quality of your content 🔥🔥

CorentinClichy
Автор

Interesting! A big difference I'm seeing is signals are synchronous while observables are asynchronous when you want to access a value, which has big implications. I guess I'll have to try signals in my next application. I would be tempted to use it in my current one, but that's going to be a big refactoring that I can't afford to do.

v.bourdeix