Mark Magyarodi
341 posts


@Armandotrue No. It is more that it CAN cause side effects. Purity is a constant trait. Either it's pure or not...can't be "sometimes pure".
Purity allows memoization, without any chance of the rest of the apps state being affected. Is this true of tap in 100% of cases?
No. Thus, not pure.
English

Another just-for-fun question
So, the #RxJS `tap` operator is specifically designed to perform side-effects
However, its implementation is just taking an Observable and returning a new one with the side-effect slapped on it
So, is `tap` itself a pure function or not? 😁

English

@Armandotrue @tsAngelNunnez true, language server can help out here anyway.
English

@ribizlim @tsAngelNunnez It's annoying a bit, I agree, but never actually cared about it
English

I've seen discussions on #Angular component selectors becoming optional in the future
Can't say I agree with this. This gives us very little gain at the cost of breaking lots of functionality, especially directives that rely on other component selectors to function.
Unless we are removing the entire metadata thing (which we are not definitely at this stage), I am not sure this is really beneficial at all.

English

@Armandotrue @tsAngelNunnez the big deal is IMHO to get rid of the "double import" thing.
English

@tsAngelNunnez IDK, it sounds nice, but I wouldn't say it's a very big deal
English

@SPabolu @joyofcodedev can you please show us a real use of it, what was your need exactly?
English

@angular2react @mfpears IMHO the angular internal code (e.g. forms and router) is also heavily using RxJS. so one needed to rewrite those moduels fully. how much (wasted) resources it will require?
English

@mfpears > If I had my wishes, the Angular team would recognize that RxJS is heavily used in Angular apps today, and spend resources on tutorials and documentation for RxJS + signal patterns
Best take on anything I've read in the last 14 days 👍
English

The reason I changed my mind about signals is because RxJS is truly bad at synchronizing states efficiently and ergonomically. But there are other things for which it is currently the _only_ good tool.
Angular supporting developers who don't want to use RxJS feels like worse than a waste of time. It's like working to support devs who don't like TypeScript. Or devs who want jQuery interop. It's going to lead to a lot of projects with redundant concepts and disjointed styles, having promises here and observables there, developers not knowing which to use when, and overall writing more imperative spaghetti code.
Part of Angular's identity is to be opinionated about best practices. But maybe declarative code is still controversial. How about we give more time to the community to work with RxJS + signals before spending resources on dropping the RxJS dependency?
Can you find Svelte developers who hate Svelte Stores? They are very similar to observables, yet I haven't heard of a split in the Svelte community over stores.
Will we ever know if the community is split because some developers hated the experience of Angular + RxJS, or RxJS itself? By assuming it's RxJS itself, aren't we creating a larger split in the community, and basing it on an improbable assumption? I believe it's improbable, given how many hoops we've had to jump through using RxJS in Angular up to now. After 8 years we finally have a way to write reactive code that uses component inputs, and a smooth way to access it with RxJS. Can't we rest for a minute and see if attitudes towards RxJS change before doing something drastic? If devs have been _tolerating_ RxJS before, won't it be easier to tolerate now?
If I had my wishes, the Angular team would recognize that RxJS is heavily used in Angular apps today, and spend resources on tutorials and documentation for RxJS + signal patterns. After a year, reassess. I think people would be surprised at how smooth learning Angular in this paradigm could actually be.
I'm a GDE but I know as much about Angular plans as any other developer. But it seems like they actually are set on removing RxJS as a dependency.
I predict that 2/3rds of new Angular projects will not use RxJS at all. 1/3rd will, and will understand why, having intentionally chosen it, and therefore code cleaner apps.
So the community will have a fairly clean split between 3 types of apps: janky legacy RxJS + Angular, new Angular sans RxJS with varying amounts of spaghetti code depending on complexity, and highly declarative Angular + RxJS codebases. Angular Query will become more popular in the generic Angular codebases. Those devs will gradually think more reactively because of that. And eventually most projects will start to use RxJS again, if AI hasn't taken all our jobs by that point. But the history of web development has been a bumpy but definite trend towards more and more declarative coding styles.
Anyway, nothing is risk-free and maybe all of this is worth widening the split in the community, because appealing to newcomers is so important at this time. It's not my decision. I just know that I will have fewer job opportunities in the future that I actually want. Going back to an imperative paradigm to me is as unappealing as going back to JavaScript from TypeScript.
I wish I had more time to work on this stuff, because my highest priority at this time is to show how simple RxJS could be with the right advice/tutorials. Maybe I can help some developers make decisions that will lead to less buggy code.
English

@TayambaM Yeah that's something the Svelte team made. It's fine for simple examples. But I watched a Svelte conference and at least 2 of the talks involved developers trying to invent RxJS again. RxJS is fine.
English

@damiantarnawsky @mfpears @jesusgrat_dev just curious how the 80% solve BE communication without using HttpClient's RxJS? using fetch and promises?
English

@mgechev drop selector for standalone components, and just use <MyComponent> instead?
English

@CesarDemi81 @Enea_Jahollari @if here is a good explanation what benefits the new syntax has (type checking, performance, zone.js independent): blog.ninja-squad.com/2023/10/11/ang…
English

@ribizlim @Enea_Jahollari @if No, I know that... If I have an if and an else, I'm replacing it with the new control flow... But if I have a single ngIf for a single element, it seems to me it's much more verbose the new syntax than the old one... don't you think?
English

Angular v17 was just released and it is PACKEDDD 🚀🚀🚀
github.com/angular/angula…
#angular
English

@CesarDemi81 @Enea_Jahollari @if also better to read, ngIf is sometimes really hard to spot. else was a nightmare with template variable too...
English

@ribizlim @Enea_Jahollari Would you prefer to add more lines for an @if{ } even though a simple ngIf could do it, to prevent importing the directive? Wondering about preferences...
English

@Enea_Jahollari is the point here that there's no import? that's huge ❤️
English

@ribizlim I saw some other cool stuff in ngPoland conf 😄
English

@omgubuntu I am currently running 6.5-RC3 it's pretty simple to upgrade kernel versions. People can use Ukuu to install new kernels it cost money to buy. Or they can download and install from tinyurl.com/3f7ep38c with the sudo dpkg -i *.deb command. 🤓
English

Ubuntu 22.04 User? You Can Now Upgrade to Linux Kernel 6.2 - omgubuntu.co.uk/2023/08/ubuntu… #linux #ubuntu

English

@laforge_toma @ngconf ok, the sentence "set or update will trigger CD" is what I'd like to read about in detail, how? That was the question in my original tweet. I've browsed the source of signals back in the preview time (before ng16 release), but there was no sign of coupling with CD...
English

Get some Signal! In this article Thomas Laforge @laforge_toma explores how signals improves on Zone.Js and onPush. Check it out and get a headstart on #Signals - the #changedetection of the future.
Check it out! bit.ly/3CrYEqD
#ngconf2023 #Angular
GIF
English

@laforge_toma @ngconf I've played a bit with it, and it seems, signals indeed do something about CD in an OnPush component: stackblitz.com/edit/angular-g…
English

@maxkoretskyi from the source of switchMap: "// We only complete the result if the source is complete AND we don't have an active inner subscription.
// This is called both when the source completes and when the inners complete."
English

@maxkoretskyi in angular, if you switchMap to a http request, it is not completing the outer observable either. this is rather how switchMap works, not a thing with EMPTY.
English






