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

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

Joshua Morony

1 год назад

92,633 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@JBJHJM
@JBJHJM - 09.01.2024 19:48

Signals seem to be pretty much what knockoutjs did many years ago. Feels kinda weird cause that's what I used before angular, til 2018, 2019 xO Still I can see its benefits.

Ответить
@pippaloves
@pippaloves - 18.12.2023 22:26

This feels like knockout…

Ответить
@Uterr
@Uterr - 18.12.2023 02:13

Actually combineLatest example may be incorrect: derivedValue going to emit 20 after valueOne.next(2), but it’s going to happen before valueTwo.next(20), so there not going to be “transitional value” in this case

Ответить
@bushbuddyplatypus
@bushbuddyplatypus - 04.11.2023 08:09

on what basis did computed() wait for both values to be updated before computing. the changeValues() funciton to complete?

Ответить
@VasilEnchev86
@VasilEnchev86 - 03.11.2023 08:49

I love mobx and signals are just mobx rebranded

Ответить
@jakehockey10
@jakehockey10 - 26.10.2023 11:14

Could you avoid the double broadcast of combineLatest with a debounce operator (maybe if you anticipate sources updating "at the same time?"

Ответить
@durairajrajendiran9725
@durairajrajendiran9725 - 15.10.2023 09:31

Simple and effective super and well explained

Ответить
@RandomDudeFromSomewhere
@RandomDudeFromSomewhere - 15.09.2023 16:51

Thank you for posting this!

Ответить
@pchoudhary
@pchoudhary - 18.07.2023 18:43

We used to use ClearCase, and everytime I suggest git, people will say, ClearCase has all the same features and lot more, just check the docs and learn it properly. Kind of same with RxJs. Simplicity is under appreciated.

Ответить
@dewinchy
@dewinchy - 14.07.2023 13:56

Great comprehension, no shit talk just real coding and explanation, I liked it much.

Ответить
@ravilamkoti5081
@ravilamkoti5081 - 07.07.2023 20:00

Great video I would like to see a video on how Signals is able to achieve glitch free computation.

Ответить
@rijin007
@rijin007 - 21.06.2023 17:14

Very nice explanation. Thank you

Ответить
@shitnase
@shitnase - 17.06.2023 14:03

Ok, I see signals are "glitchfree" but for our applications its okay to have those "glitches". The users can't see them and we love rxjs so we will stay with it. Once you got used to rxjs and it's power it immediately speeds up productivity and keeps the code very clean. Also I do not want to have a mix between signals und rxjs because it makes the code more complex 🤔

Ответить
@PieJee1
@PieJee1 - 10.06.2023 08:38

I noticed most people struggle with observables when they try to learn Angular and is often the reason people switch to other frameworks like vue or react.

Ответить
@jamisonr
@jamisonr - 04.06.2023 19:44

Nice explanation, thanks!

Ответить
@metax73
@metax73 - 03.06.2023 20:08

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.

Ответить
@peachezprogramming
@peachezprogramming - 30.05.2023 04:00

Thank god. I was just beginning to learn RxJS and it was so difficult i quit for a bit. Now I"m going to learn Signals instead

Ответить
@florianneumann9441
@florianneumann9441 - 26.05.2023 08:17

Actually - i like angular got signals a lot.. Good points - especially about rxjs and how it hinders angular adoption... it's always a pain to check all the rxjs code of beginners for all this stuff... signals will make development easier for so many...

Ответить
@alexcoroza4518
@alexcoroza4518 - 26.05.2023 05:35

RxJS and the concept of observables I think is the main reason new developers try to stay away from Angular. It is more of a new concept for most of us and you really need to learn it. Facing that big learning curve will surely intimidate devs who are new to Angular and will think Angular is full of shit and unnecessary complexities. I agree that it is a good thing to introduce Signals with Angular as it is way much simpler and straightforward. I use RxJS in all of my Angular projects for years now and I dont even utilize those complex operators in most of those projects(except for a few features and requirements). I find signals to be enough for my needs.

Ответить
@hevans900
@hevans900 - 23.05.2023 20:13

So after 7 years Angular finally gets some DX... sorry but most of the world has moved on lol.

Ответить
@v.bourdeix
@v.bourdeix - 22.05.2023 11:43

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.

Ответить
@emilemil1
@emilemil1 - 22.05.2023 02:46

Not being able to get the latest value emitted by an observable is probably my greatest annoyance with RxJS. Sure, it's not something you should ever need in a purely reactive codebase, but a lot of the time you are not coding fully reactive, and in those cases it sucks to not have this basic feature.

Ответить
@salamon918
@salamon918 - 19.05.2023 19:43

I wonder how I can separate the changes in the effect, when which "signal" or "computed" has changed?

Ответить
@dusanjovanovski8752
@dusanjovanovski8752 - 18.05.2023 10:21

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

Ответить
@Chladimir
@Chladimir - 16.05.2023 12:12

All "problems" (I would say side-effects) you mentioned are actually very EZ fixable in RxJS, so I it's not so cut and dry. However one has to have some experience to see those side-effects immediatelly during writing the code. Only real difference I can see is in writing less code out-of-the-box, which can be erased by writing one single cutom pipe and apply it anywhere you want. Then the practical difference is going to be mySignal vs my$.pipe(signalLike())...
Still, it's great to have that extra option as it makes Angular more approachable and predictable to newcomers

Ответить
@user-zn5zg3ws8x
@user-zn5zg3ws8x - 16.05.2023 11:43

Nice Explained

Ответить
@c0mpuipf
@c0mpuipf - 13.05.2023 10:59

The average developer would have spent about 5 6 years learning the patterns of rxjs as well as its drawbacks and glitches. But now: time to throw that out the window and wait for some state management that uses signals instead of ngrx and refactor that. It's good. I make more money, I sound smart and trendy by using the latest trends, its all the dream of any developer 😂.

Ответить
@user-zl5gi8sv7u
@user-zl5gi8sv7u - 12.05.2023 00:20

Fireship rip-off?

Ответить
@Matrium0
@Matrium0 - 11.05.2023 21:31

Great explanation, thank you!

Ответить
@ferlezcano
@ferlezcano - 11.05.2023 19:45

I've learned a lot (everything) about RxJs watching your videos... Now that I understand 30% about it, Signals appears in the picture 😥

Ответить
@user-ds5iy5sx1i
@user-ds5iy5sx1i - 11.05.2023 18:06

Am I the only one who knows that Angular is becoming similar to Vue?

Ответить
@user-ui9ri3hf8d
@user-ui9ri3hf8d - 05.05.2023 15:01

While I agree that signals are easier alternative, I want to mention that your example during the side effects can be simply fixed by using shareReplay(1) method, that way your log will only trigger once

Ответить
@FrontendWizardry-zl3hs
@FrontendWizardry-zl3hs - 05.05.2023 11:25

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

Ответить
@reidyoung298
@reidyoung298 - 03.05.2023 21:48

Fun times ahead with more friction with state management justifiable with signals and side effects. Hopefully, this brings the community together and avoids class files with 40 mutated values in them, right? Nobody still? Ok cool.

Ответить
@Czulu
@Czulu - 02.05.2023 17:10

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

Ответить
@muhamedkarajic
@muhamedkarajic - 27.04.2023 08:54

Practical video :) love it!

Ответить
@enriqueruiz320
@enriqueruiz320 - 26.04.2023 12:13

IO ♥ Rxjs

Ответить
@its_vincesanity
@its_vincesanity - 21.04.2023 13:11

It's a pretty handy utility, but I already see the overuse of signals and even more complex components.

Ответить
@pileqrai
@pileqrai - 15.04.2023 11:42

What I'm missing here is the fact that these two serve to a different purpose. All these "issues" can be solved with operators, and with Signals new issues will pop-up, just as with computed properties in EmberJS. I see them more like RxJS being data provider and Signals used to deliver this data. Anyway good video

Ответить
@shieha
@shieha - 15.04.2023 03:07

this is more like a demo of all the things wrong with RxJs and frontend dev 😂😂😂

Ответить
@vladimirshameev1038
@vladimirshameev1038 - 11.04.2023 23:18

Hey, thanks for the great videos. I like your presentation of the material. May I ask what color scheme or theme you use in this video? Can you share?

Ответить
@MishaAmashukeli
@MishaAmashukeli - 08.04.2023 23:45

Something that you did not mention(unless I missed it): an effect(() => {...}) created inside a component gets destroyed automatically when the component gets destroyed, unlike RxJS where you need to unsubscribe/takeUntil.

Ответить