No video

Building with Ivy: rethinking reactive Angular | Mike Ryan |

  Рет қаралды 16,284

AngularConnect

AngularConnect

Күн бұрын

Пікірлер: 42
@netd777
@netd777 4 жыл бұрын
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).
@Bryanerayner
@Bryanerayner 4 жыл бұрын
Beautiful. This will be incredibly elegant when complete.
@kardashevr
@kardashevr 4 жыл бұрын
you don't have to unsub from the core angular observables (like from HttpClient), because Angular itself handles that
@MA-kt8ly
@MA-kt8ly 4 жыл бұрын
Ruslan Kardashev yes this ss what every tutorial says. If subscribing from angular components, they are auto unsub.
@brianm2029
@brianm2029 3 жыл бұрын
Yeah http observables complete after delivery
@bouloan7576
@bouloan7576 2 жыл бұрын
I was just asking myself, why does he subscribe for http request?? And I see your comment 😁
@abderrahmanemustapha233
@abderrahmanemustapha233 Жыл бұрын
Amazing talk
@ericaskari
@ericaskari 4 жыл бұрын
This video is GOLD.
@matthewhill4649
@matthewhill4649 4 жыл бұрын
I don't understand: for the first problem, why would you not simply use the "share" operator?
@artemeelemann317
@artemeelemann317 4 жыл бұрын
Yeah! Why nobody told this guy that the share operator exists :D
@yikan1107
@yikan1107 3 жыл бұрын
​@@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.
@bluebee2431
@bluebee2431 3 жыл бұрын
Fantastic talk, Mike!
@dsedchenko
@dsedchenko 4 жыл бұрын
imho it's over-engineering
@LarsRyeJeppesen
@LarsRyeJeppesen 4 жыл бұрын
Mind blown - this is epic stuff
@marcialabrahantes3369
@marcialabrahantes3369 2 жыл бұрын
Have there been any updates on this effort? Anyone used it in practice?
@raknjarasoa
@raknjarasoa 4 жыл бұрын
Amazing. Thanks for talk
@mikelipin6556
@mikelipin6556 4 жыл бұрын
The approach is awesome
@masterlup
@masterlup 3 жыл бұрын
Michael Hladky: "hold my beer"
@eliancordoba1199
@eliancordoba1199 4 жыл бұрын
Wow excellent talk!
@PaweSmoka
@PaweSmoka 4 жыл бұрын
I am happy to see this direction, however, I got one question - why copy-paste react solutions instead of using react then?
@marcialabrahantes3369
@marcialabrahantes3369 2 жыл бұрын
legacy projects? 🤷‍♂️
@PaweSmoka
@PaweSmoka 2 жыл бұрын
@@marcialabrahantes3369 you can use react in angular in such case still and step by step replace. React is just a lib.
@chellappanv2281
@chellappanv2281 4 жыл бұрын
Woo Great talk!!!!!!!
@vukkumsp
@vukkumsp 2 жыл бұрын
httpClient will automatically unsubscribes once received, Isn't it? Do we need to manually unsubscribe it ??
@alionakastsevich6238
@alionakastsevich6238 2 жыл бұрын
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
@tomastrajan3377
@tomastrajan3377 4 жыл бұрын
IVY + no zone.js is amazing but please, lets make this happen without HOCs, zoneless async pipe or anything else
@LarsRyeJeppesen
@LarsRyeJeppesen 4 жыл бұрын
What's wrong with HOCs? They are awesome for lots of things... form elements for instance
@hamzabenkhaldoun
@hamzabenkhaldoun 4 жыл бұрын
@@LarsRyeJeppesen One prime reason why React made the hooks api is to get rid of the HOC pattern
@LarsRyeJeppesen
@LarsRyeJeppesen 4 жыл бұрын
@@hamzabenkhaldoun ok thanks
@kostiantyn187
@kostiantyn187 4 жыл бұрын
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-jv2tg1uz3r
@user-jv2tg1uz3r 4 жыл бұрын
ngIf don`t work with enabled ivy Can't bind to 'ngIf' since it isn't a known property of 'div'.
@patricknazar
@patricknazar 4 жыл бұрын
did you import CommonModule?
@MAKU011111
@MAKU011111 4 жыл бұрын
You do not need to unsubscribe from a subscription you get from HttpClient (as mentioned at 24:09)
@GG-ky3by
@GG-ky3by 4 жыл бұрын
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.
@marianbencat6658
@marianbencat6658 4 жыл бұрын
you HAVE TO, else, you may get tons of memory leaks and strange behavior when your requests take longer than expected (30sec request time)
@MAKU011111
@MAKU011111 4 жыл бұрын
@@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
@marianbencat6658
@marianbencat6658 4 жыл бұрын
@@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.
@MAKU011111
@MAKU011111 4 жыл бұрын
@@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)
@rgh1986aka199
@rgh1986aka199 2 жыл бұрын
I understood nothing!!
@hansschenker
@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?
Quantum NgRx Facades | Sam Julien | #AngularConnect
24:29
AngularConnect
Рет қаралды 3,2 М.
The Architecture of Components | Erin Coughlan | #AngularConnect
23:58
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 12 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 20 МЛН
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 17 МЛН
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18
Data Composition with RxJS | Deborah Kurata
20:56
ng-conf
Рет қаралды 64 М.
The Theory of Angular Ivy | Alex Rickabaugh | AngularConnect 2018
41:16
How Angular works | Kara Erickson | #AngularConnect
29:42
AngularConnect
Рет қаралды 62 М.
Angular Tutorial For Beginners | 3 Hours Course
3:17:50
Bouali Ali
Рет қаралды 84 М.
Crust of Rust: async/await
2:34:01
Jon Gjengset
Рет қаралды 190 М.
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 12 МЛН