Very, very interesting. I'm really excited to see how the community will develop this workflow. Not only it will greatly reduce minimal app size because you don't need zone.js, but I believe this way of doing it is also a lot simpler to understand than zone.js. Less "black magic" and a lot more of core Rx concepts applied. Concise, elegant, less error prone (if we develop a simpler workflow) and can provide more granular control of "rendering" (sometimes you can't avoid it).
@Bryanerayner4 жыл бұрын
Beautiful. This will be incredibly elegant when complete.
@kardashevr4 жыл бұрын
you don't have to unsub from the core angular observables (like from HttpClient), because Angular itself handles that
@MA-kt8ly4 жыл бұрын
Ruslan Kardashev yes this ss what every tutorial says. If subscribing from angular components, they are auto unsub.
@brianm20293 жыл бұрын
Yeah http observables complete after delivery
@bouloan75762 жыл бұрын
I was just asking myself, why does he subscribe for http request?? And I see your comment 😁
@abderrahmanemustapha233 Жыл бұрын
Amazing talk
@ericaskari4 жыл бұрын
This video is GOLD.
@matthewhill46494 жыл бұрын
I don't understand: for the first problem, why would you not simply use the "share" operator?
@artemeelemann3174 жыл бұрын
Yeah! Why nobody told this guy that the share operator exists :D
@yikan11073 жыл бұрын
@@artemeelemann317 Well, his proposal is a much smaller foot print. 2 separate data streams get combined into one. The dom that requires the second data piece will not always render because the first data piece comes in. So you make that dom dependant on that piece of data...Which forces you to rewrite your data to conform to say an object. And now you have action dispatch pattern you have to enforce on two disparate pieces of data. you could probably use it the observable to update a class attribute but then you'd end up withe same amount of code now as you had with method 2 (controller based observer management) Whereas, he is proposing that each variable is reactive and you call that render on just an ngIf in the view template. Its harder to make bad code with his protototype. If you want to nitpick, I would go for the fact that everybody wants to be that final class which is why he recommends integration with akita. This is a data component level final class and not a layout final class. You'd most likely wrap your ui library with a data-reactive-component and serve it into a layout view Its a lot less code. But i doubt anyone is going to work this into production code. No one is going to turn off ngzone globally. The main problem is component level control of rerender is going to be more performant than service level control of rerender. Writing acode to batch aync code properly for performance is a friggin chore. rather than this, i would like to see more support for custom ChangeDetectionStrategy or increased options. ChangeDetectionStrategy.OnCustom({rerenderOnAsyncOps: false}) that's step 1 . Reactive Component Library is step 2.
@bluebee24313 жыл бұрын
Fantastic talk, Mike!
@dsedchenko4 жыл бұрын
imho it's over-engineering
@LarsRyeJeppesen4 жыл бұрын
Mind blown - this is epic stuff
@marcialabrahantes33692 жыл бұрын
Have there been any updates on this effort? Anyone used it in practice?
@raknjarasoa4 жыл бұрын
Amazing. Thanks for talk
@mikelipin65564 жыл бұрын
The approach is awesome
@masterlup3 жыл бұрын
Michael Hladky: "hold my beer"
@eliancordoba11994 жыл бұрын
Wow excellent talk!
@PaweSmoka4 жыл бұрын
I am happy to see this direction, however, I got one question - why copy-paste react solutions instead of using react then?
@marcialabrahantes33692 жыл бұрын
legacy projects? 🤷♂️
@PaweSmoka2 жыл бұрын
@@marcialabrahantes3369 you can use react in angular in such case still and step by step replace. React is just a lib.
@chellappanv22814 жыл бұрын
Woo Great talk!!!!!!!
@vukkumsp2 жыл бұрын
httpClient will automatically unsubscribes once received, Isn't it? Do we need to manually unsubscribe it ??
@alionakastsevich62382 жыл бұрын
Yes, it will unsubscribe automatically… once the call will be completed, but it is better to do it onDestroy as in this case it will unsubscribe exactly onDestroy and cancel all pending requests
@tomastrajan33774 жыл бұрын
IVY + no zone.js is amazing but please, lets make this happen without HOCs, zoneless async pipe or anything else
@LarsRyeJeppesen4 жыл бұрын
What's wrong with HOCs? They are awesome for lots of things... form elements for instance
@hamzabenkhaldoun4 жыл бұрын
@@LarsRyeJeppesen One prime reason why React made the hooks api is to get rid of the HOC pattern
@LarsRyeJeppesen4 жыл бұрын
@@hamzabenkhaldoun ok thanks
@kostiantyn1874 жыл бұрын
HOCs have some limitations, one of theme is multiple class inheritance, in React world for that case composition has comes and HOC’s works as expected, that’s is more suitable for functional paradigm but Angular is on the OOP way and I suppose it is more fashion way to apply props through annotation decorators @connect()
@user-jv2tg1uz3r4 жыл бұрын
ngIf don`t work with enabled ivy Can't bind to 'ngIf' since it isn't a known property of 'div'.
@patricknazar4 жыл бұрын
did you import CommonModule?
@MAKU0111114 жыл бұрын
You do not need to unsubscribe from a subscription you get from HttpClient (as mentioned at 24:09)
@GG-ky3by4 жыл бұрын
Yeah, there is no memory leak as mentioned at 1:57. But you might still want to unsubscribe so the subscribe callback doesn't get called.
@marianbencat66584 жыл бұрын
you HAVE TO, else, you may get tons of memory leaks and strange behavior when your requests take longer than expected (30sec request time)
@MAKU0111114 жыл бұрын
@@marianbencat6658 I do not see what you mean. Unsubscription is handled in success / error case automatically. Of course calling the unsubscribe method is useful when yout have to cancel an "in progress" HTTP request
@marianbencat66584 жыл бұрын
@@MAKU011111 read it again and slowly... - yes, unsubscription is handled in success / error case - yes, when request ENDS with success / error - WHEN REQUEST ENDS - so if requests takes 30 sec, you are leaking resources for 30sec. MEMORY LEAK: - not freed resources when not needed anymore - try to subscribe in a component to 30sec (or timeout) lasting request and go BACK and THERE 30times... = you will need 30x more resources + YOU WILL LISTEN 30times except once.
@MAKU0111114 жыл бұрын
@@marianbencat6658 yeah I get you point. But this example is very constructed.... In general I would not handle the unsubscription of http calls (but thats my personal opinion - but also heard on several occasions from others)
@rgh1986aka1992 жыл бұрын
I understood nothing!!
@hansschenker Жыл бұрын
Why is Angular not following this approach? Is it pride not to have invented it! Are Google's developer not able to think in RxJs terms?