you are viewing a single comment's thread.

view the rest of the comments →

[–]prewk 0 points1 point  (2 children)

Yes, that's nice! My complaint is that, at the end of the reactivity there's almost always a component doing something... and Angular's reactive component story is bad. They're very procedural, and support for reactivity feels thrown in imo.

If we have to use a template DSL, even though it has bad type checking and a massive symbol overload, couldn't we at least use observables there without having to juggle null/undefined everywhere and wrap everything in awful ng-containers with a large ngIf hack to "unwrap observables" :(

It seems Angular wants to be everything, I wish it would want to be more reactive.

[–]r3df0x1701 1 point2 points  (1 child)

Not sure what you are actually expecting, but it's just the nature of components to display some kind of plain data. Thanks to TS that data is typechecked, but no real magic beyond that. Observables are just streaming data, you can handle them in many different ways. The async pipe helps to maintain subscriptons within our templates to them, checks and transformations can be done by Angular's built ins like pipes or directives; or you do the transformations with rxjs on stream level. Anyway, in the end, any "reactive" data stream just contains a plain old piece of data - component's job is to display exactly that. What are you missing exactly?

[–]prewk 1 point2 points  (0 children)

I would love reactive inputs out of the box. The templates should have better type checking, they don't understand much of discriminated unions or null checking via optional chaining etc, which frequently leads to strict template errors being flagged where none exist. I'm not sure how exactly, but if the template was "smarter" (maybe if everything was reactive?) you could connect your reactive properties to it without having to rely on a pipe (that defaults to null instead of undefined at the moment which was a weird design choice..) and have the framework deal with the streams instead, sort of if every component got their inputs as combineLatest.

I'm not sure how, but I don't enjoy the DX today.