Really helpful. I was struggling with the a complex for loop and performance issue, this one helped me fix that by understanding what I am doing wrong.
great video and tips, thank you! quick question about the example you said at the end for an object with like 20 properties, how would you tackle that? Pass each property as an input so it doesn't trigger many re-renders?
In real project I won't optimize until I have performance problems. Not each project will have a bottle neck. Passing 20 props is not fun, I would split it in several comps and try to have 5 or less. Additionally it doesn't make sense to optimize rerendering of a single component on the page. You would focus on optimizing comps which are rendered and re-rendering 1000 times on the page.
using new @for syntax flow Angular enforces to use trackBy as it is required and if someone starts learning Angular it should do it with latest version so this should not be an issue.
It doesn't make this obsolete. All same rules are applied to @for in control flow. track by by index can be bad, passing inputs as objects rerenders a child, etc.
You could create an input on the child for each property of the parent object that you need in some cases. This doesn't scale well, but could work for smaller objects.
It doesn't make this obsolete. All same rules are applied to @for in control flow. track by by index can be bad, passing inputs as objects rerenders a child, etc.
@@MonsterlessonsAcademy Well, obviously I'm dumb. 💯 thank you! I'm glad I found your channel. very high-quality content, cool presentation, clear English and there is always prompt feedback. 🔥
WATCH NEXT: Angular Unit Testing Course - All That You Need to Know About Testing - ua-cam.com/video/bv9z_UfSqgM/v-deo.htmlsi=WVzOWtdQUZWEbqsz
Really helpful. I was struggling with the a complex for loop and performance issue, this one helped me fix that by understanding what I am doing wrong.
Glad it helps!
great video and tips, thank you! quick question about the example you said at the end for an object with like 20 properties, how would you tackle that? Pass each property as an input so it doesn't trigger many re-renders?
In real project I won't optimize until I have performance problems. Not each project will have a bottle neck. Passing 20 props is not fun, I would split it in several comps and try to have 5 or less.
Additionally it doesn't make sense to optimize rerendering of a single component on the page. You would focus on optimizing comps which are rendered and re-rendering 1000 times on the page.
@@MonsterlessonsAcademy thanks for the reply, great insights!
How about the new "for" In angular v18, do we need to optimize it too in some kind of way like trackby?
Trackby is required in v18
You mean @for control flow in html? It is there starting from Angular 17 and all same rules are applied there as well as trackby.
@@MonsterlessonsAcademy yes sir, I see, thanks
using new @for syntax flow Angular enforces to use trackBy as it is required and if someone starts learning Angular it should do it with latest version so this should not be an issue.
It doesn't make this obsolete. All same rules are applied to @for in control flow. track by by index can be bad, passing inputs as objects rerenders a child, etc.
Well explained. But in real-time application, we pass object to child component because we need to access multiple properties of that object.
Sure. Which works just fine until you get to the point where performance is really important and you want to avoid renders.
Which strategy would you use in this case? @@MonsterlessonsAcademy
You could create an input on the child for each property of the parent object that you need in some cases. This doesn't scale well, but could work for smaller objects.
Great video as always, Thank you !
can you please tell me what theme are you using ? I really love the colors.
It's Gruvbox
important tips, however worth noting that angular 17 (i think) introduced new template syntax with required track by, which makes this obsolete
It doesn't make this obsolete. All same rules are applied to @for in control flow. track by by index can be bad, passing inputs as objects rerenders a child, etc.
Thank you so much, it was really helpful
Glad it helped!
Thanks for the video. Where can I find the source code of this episode?
The source code is always in the description
@@MonsterlessonsAcademy Yes, I saw it. maybe I'm a bit dumb, but I couldn't find a corresponding branch to this episode in the repository.
@@IvanBanifatsyeu It opens already the correct branch for this video
@@MonsterlessonsAcademy Well, obviously I'm dumb. 💯 thank you! I'm glad I found your channel. very high-quality content, cool presentation, clear English and there is always prompt feedback. 🔥
Amazing, good job.
Thank you very much!
Great stuff as always! Any chance you will drop Analog.js crash course in the future?
I will add it to the list of ideas
THX BRO!
Any time!
thank you
You're welcome
Really helpful thank u! Please don’t start a channel about making ice cream, because I will become so fat!😂
Lol. I would consider that.