💥 Angular Mistake #5: 🛑 STOP Overusing OnPush Change Detection

Опубликовано: 04 Октябрь 2024
на канале: Angular University
3,888
208

Angular Mistakes Series Playlist -    • 💥Angular Mistakes #1: ✋ DON'T Overuse...  

Angular Mistake #1 - Don't Overuse the Angular Async Pipe -    • 💥Angular Mistakes #1: ✋ DON'T Overuse...  
Angular Mistake #2 - Stop Using RxJs For Doing Simple HTTP -    • 💥 Angular Mistakes #2: DON'T Overuse ...  
Angular Mistake #3: Stop Fixing RxJs Memory Leaks This Way -    • 💥 Angular Mistakes #3: 🛑 STOP Fixing ...  
Angular Mistake #4: STOP Avoiding Using Promises -    • 💥 Angular Mistakes #3: 🛑 STOP Fixing ...  
Angular Mistake #5: STOP Overusing OnPush Change Detection -    • 💥 Angular Mistake #5: 🛑 STOP Overusin...  

You might have been led to believe that there is something inherently wrong with Angular default change detection, but the reality is that for the vast majority of cases, it's still the right choice.

OnPush change detection comes with a significant complexity cost that might not make it a good fit for you, your team and your project.

Watch this video to weight the pros and the cons of OnPush, so that you can decide for yourself if OnPush is the right choice for you.

Timestamps:

0:00 Intro
2:15 - Default vs OnPush
5:41 - Default Change detection
9:44 - OnPush Change detection
14:24 - Default vs OnPush comparison
17:49 - Beware of the dangers of Yack Shaving (Unnecessary Complexity)
20:23 - Summarizing my opinion

Related articles on the Angular University blog:

Angular OnPush Change Detection and Component Design - Avoid Common Pitfalls - https://blog.angular-university.io/on...

Free content at the Angular University:

20% of our lessons are free, you don't have to login to watch the lessons. The free lessons are the ones with the P (Pro) - https://angular-university.io

Watch the free Angular For Beginners Course - https://angular-university.io/course/...

Follow me:

Twitter -   / angularuniv  
Facebook -   / angular.university  
YouTube -    / @angularuniversity  
Instagram -   / angular.university  
LinkedIn -   / angular-university  
TikTok -   / angularuniversity  
Threads - https://www.threads.net/@angular.univ...