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

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

4.363 Lượt nghe
💥 Angular Mistake #5: 🛑 STOP Overusing OnPush Change Detection
Angular Mistakes Series Playlist - https://www.youtube.com/watch?v=3oq-gnDzz9k&list=PLOa5YIicjJ-X-Pl7Dk2Z9tIYm5DtwK2aJ - Angular Mistake #1 - Don't Overuse the Angular Async Pipe - https://youtu.be/3oq-gnDzz9k - Angular Mistake #2 - Stop Using RxJs For Doing Simple HTTP - https://youtu.be/2_1EaSnYDBE - Angular Mistake #3: Stop Fixing RxJs Memory Leaks This Way - https://youtu.be/T7FMXAXtReQ - Angular Mistake #4: STOP Avoiding Using Promises - https://youtu.be/T7FMXAXtReQ - Angular Mistake #5: STOP Overusing OnPush Change Detection - https://youtu.be/Pq9AikhJjyo 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/onpush-change-detection-how-it-works/ 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/getting-started-with-angular2 Follow me: Twitter - https://twitter.com/AngularUniv Facebook - https://www.facebook.com/angular.university YouTube - https://www.youtube.com/channel/UC3cEGKhg3OERn-ihVsJcb7A Instagram - https://www.instagram.com/angular.university LinkedIn - https://www.linkedin.com/company/angular-university TikTok - https://www.tiktok.com/@angularuniversity Threads - https://www.threads.net/@angular.university14:24