Modern Change Detection

Rainer Hahnekamp December 18, 2024
Video Thumbnail
Rainer Hahnekamp Logo

Rainer Hahnekamp

View Channel

About

Welcome to my YouTube channel! I'm Rainer, a full-stack developer from Austria specializing in Angular and Spring. As a Google Developer Expert and a trainer/consultant at AngularArchitects.io, I'm here to share my expertise with you. Subscribe and stay updated with my latest content! Don't forget to connect with me on X (@rainerhahnekamp).

Video Description

Change Detection is the backbone of Angular, ensuring that your components stay in perfect sync with the DOM. Over the years, it has evolved significantly, culminating in one of the most exciting advancements: zoneless change detection, introduced in Angular 18. Though still experimental, its high demand has led companies to already adopt it in production—and even Google is rumored to use it as the default for new projects. Yet, despite its importance, Change Detection remains one of the most misunderstood aspects of Angular. It’s often surrounded by myths, like the idea that “it re-renders the entire DOM on every run.” Spoiler: that’s not true. In this video, I’ll take you on a deep dive to demystify how Angular’s Change Detection works. You’ll learn about key concepts like Local Change Detection, Hybrid Mode, and OnPush. I’ll also provide a sneak peek into the future of Angular with Signal Components. Through practical examples and clear explanations, you’ll gain insight into potential pitfalls, strategies for optimizing performance, and the latest advancements, like zoneless change detection. By the end, you’ll have everything you need to build performant Angular applications—and maybe even a newfound appreciation for the magic behind Change Detection. This video is a revised version of https://youtu.be/0PJPZ3rLqrY, updated with the latest knowledge and techniques. 0:00 0. Introduction 1:14 1. Change Detection with zone.js (Theory) 📘 7:45 2. OnPush Strategy (Theory) 📚 12:20 3. Change Detection with zone.js (Practice) 🎬 18:22 4. OnPush Issues - Asynchronous Tasks ⏳ 29:06 5. OnPush Issues - Mutable Property Binding ♻️ 31:24 6. Local Change Detection (Angular 17) 🎯 35:21 7. Zoneless Change Detection (Angular 18) 🚦 43:45 8. Future of Change Detection 🔮 47:21 9. Summary & Farewell Angular Architects offers a variety of workshops focused on Angular. Two upcoming public workshops where I’ll be the trainer are: - https://www.angulararchitects.io/en/training/professional-ngrx-advanced-state-management-best-practices/ - https://www.angulararchitects.io/en/training/professional-angular-testing-playwright-edition/

Essentials for Advanced Time-Lapse

AI-recommended products based on this video

Loading...
ROVE R2-4K DUAL Dash Cam Front and Rear, STARVIS 2 Sensor, FREE 128GB Card Included, 5G WiFi - up to 20MB/s Fastest Download Speed with App, 4K 2160P/FHD Dash Camera for Cars, 3" IPS, 24H Parking Mode
Best Seller

ROVE R2-4K DUAL Dash Cam Front and Rear, STARVIS 2 Sensor, FREE 128GB Card Included, 5G WiFi - up to 20MB/s Fastest Download Speed with App, 4K 2160P/FHD Dash Camera for Cars, 3" IPS, 24H Parking Mode

(6,668)
$99.99$89.99
FREE delivery Sun, Sep 21
10K+ bought in past month
Loading...
COOWPS Switch Case for Nintendo Switch and Switch OLED Model, Portable Full Protection Carrying Travel Bag with 18 Game Cards Storage for Switch Console Pro Controller Accessories Black

COOWPS Switch Case for Nintendo Switch and Switch OLED Model, Portable Full Protection Carrying Travel Bag with 18 Game Cards Storage for Switch Console Pro Controller Accessories Black

(2,497)
$24.99$22.99
FREE delivery Mon, Jun 16 on $35 of items shipped by Amazon
800+ bought in past month
Loading...
UGREEN Revodok Pro 210 Docking Station 10 in 1 USB C Dock Dual HDMI 4K@60Hz Single 8K@30Hz 100W PD 5Gbps USB C and USB A Data Ports Gigabit Ethernet, SD/TF Card Reader USB Hub Compatible for HP, Dell

UGREEN Revodok Pro 210 Docking Station 10 in 1 USB C Dock Dual HDMI 4K@60Hz Single 8K@30Hz 100W PD 5Gbps USB C and USB A Data Ports Gigabit Ethernet, SD/TF Card Reader USB Hub Compatible for HP, Dell

(1,701)
39.99
PrimeFREE delivery Saturday, June 14
100+ bought in past month
Loading...
ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

(13,939)
109.99
FREE delivery Saturday, June 14
9K+ bought in past month
Loading...
Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

(109,961)
$17.99$17.81
FREE delivery Fri, Aug 8 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
Lexar ES3 1TB External SSD, USB 3.2 Gen2 Portable SSD, PSSD Up to 1050MB/s Read, 1000MB/s Write, External Solid State Drive Compatible with iPhone 16/15 Series/Mac/PS5/XBOX/Laptop/PC

Lexar ES3 1TB External SSD, USB 3.2 Gen2 Portable SSD, PSSD Up to 1050MB/s Read, 1000MB/s Write, External Solid State Drive Compatible with iPhone 16/15 Series/Mac/PS5/XBOX/Laptop/PC

(37)
69.99
PrimeFREE delivery Saturday, June 14
300+ bought in past month
Loading...
Adobe Photoshop Elements 2025 | PC/Mac | Software Download | Photo Editing | 3-year term license | Activation Required

Adobe Photoshop Elements 2025 | PC/Mac | Software Download | Photo Editing | 3-year term license | Activation Required

(225)
$59.99
Available now
Loading...
Ailun 3 Pack Screen Protector for iPhone 17 Pro Max [6.9 inch] with Installation Frame, Tempered Glass, Sensor Protection, Dynamic Island Compatible, Case Friendly Global Recycled Standard

Ailun 3 Pack Screen Protector for iPhone 17 Pro Max [6.9 inch] with Installation Frame, Tempered Glass, Sensor Protection, Dynamic Island Compatible, Case Friendly Global Recycled Standard

(1,103,714)
$6.98
FREE delivery Wed, Dec 31 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
Ailun 3 Pack Screen Protector for iPhone 17 Pro [6.3 inch] with Installation Frame, Tempered Glass,Sensor Protection, Dynamic Island Compatible, Case Friendly [Not for iPhone 17/17 Pro Max/iPhone Air] Global Recycled Standard

Ailun 3 Pack Screen Protector for iPhone 17 Pro [6.3 inch] with Installation Frame, Tempered Glass,Sensor Protection, Dynamic Island Compatible, Case Friendly [Not for iPhone 17/17 Pro Max/iPhone Air] Global Recycled Standard

(1,103,714)
$6.98
FREE delivery Wed, Dec 31 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
FIFINE XLR/USB Gaming Microphone Set, Dynamic PC Mic for Streaming Podcasting, Computer RGB Mic Kit with Boom Arm Stand, Mute Button, Headphones Jack, for Recording Vocal Voice-Over-AmpliGame AM8T Global Recycled Standard
Best Seller

FIFINE XLR/USB Gaming Microphone Set, Dynamic PC Mic for Streaming Podcasting, Computer RGB Mic Kit with Boom Arm Stand, Mute Button, Headphones Jack, for Recording Vocal Voice-Over-AmpliGame AM8T Global Recycled Standard

(3,527)
$67.99
FREE delivery Thu, Sep 4
4K+ bought in past month
Loading...
FIFINE USB/XLR Dynamic Microphone for Podcast Recording, PC Computer Gaming Streaming Mic with RGB Light, Mute Button, Headphones Jack, Desktop Stand, Vocal Mic for Singing YouTube-AmpliGame AM8 Global Recycled Standard ClimatePartner certified
Best Seller

FIFINE USB/XLR Dynamic Microphone for Podcast Recording, PC Computer Gaming Streaming Mic with RGB Light, Mute Button, Headphones Jack, Desktop Stand, Vocal Mic for Singing YouTube-AmpliGame AM8 Global Recycled Standard ClimatePartner certified

(6,248)
$54.99
FREE delivery Thu, Sep 4
8K+ bought in past month