Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Change Detection - Deep Dive
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Rainer Hahnekamp
February 29, 2024
Technology
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Change Detection - Deep Dive
Rainer Hahnekamp
February 29, 2024
More Decks by Rainer Hahnekamp
See All by Rainer Hahnekamp
Angular Architecture Revisited Modernizing Angular Architectural Patterns
rainerhahnekamp
0
240
NgRx SignalStore: The Power of Extensibility
rainerhahnekamp
0
380
Vitest Highlights in Angular
rainerhahnekamp
0
420
From Hours to Minutes - An AI Case Study with Sheriff
rainerhahnekamp
0
55
RxJS, Signals, and Native Observables: Answering the Critical Questions
rainerhahnekamp
0
51
Zurück in den Browser – Das Comeback der Frontend-Tests
rainerhahnekamp
0
120
From Hours to Minutes: An AI Case Study with Sheriff
rainerhahnekamp
0
210
RxJS, Signals & Native Observables
rainerhahnekamp
0
200
The Road to Angular Today Milestones, Mistakes & Momentum
rainerhahnekamp
0
190
Other Decks in Technology
See All in Technology
AIが当たり前の組織で エンジニアはどう育つか
nishihira
1
1.3k
AI時代におけるエンジニアの新たな役割──FDEとクオリアの探求/登壇資料(戸井田 裕貴)
hacobu
PRO
0
480
AI研修(Day2)【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
780
そのドキュメント、自動化しませんか?
yuksew
1
450
kaonavi Tech Night#1
kaonavi
0
180
キャリアLT会#3
beli68
2
280
【公開用】AI_Dev_Ex2026_AI_登壇資料
matsuritechnologies
PRO
2
640
Vポイント分析基盤におけるデータモデリング20年史
taromatsui_cccmkhd
4
770
データ活用研修 問いの発見と仮説構築【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
340
それでも、技術なブログを書く理由 #kichijojipm / Why I Still Write Tech Blogs Even Now
shinkufencer
0
990
WEBフロントエンド研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
340
AI工学特論: MLOps・継続的評価
asei
11
2.8k
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
320
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
Ethics towards AI in product and experience design
skipperchong
2
330
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
880
Context Engineering - Making Every Token Count
addyosmani
9
1k
Prompt Engineering for Job Search
mfonobong
0
380
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
310
Why Our Code Smells
bkeepers
PRO
340
58k
The Curious Case for Waylosing
cassininazir
1
440
Code Review Best Practice
trishagee
74
20k
Transcript
RainerHahnekamp Deep Dive Change Detection Rainer Hahnekamp - 29. February
2024 - ngOslo
RainerHahnekamp About Me... Professional NgRx https://www.youtube.com/ @RainerHahnekamp https://www.ng-news.com https://github.com/softarc-consulting/sheriff •
Rainer Hahnekamp ANGULARarchitects.io • Developer / Trainer / Speaker Modern Spring for Angular @RainerHahnekamp
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Component Tree Web Application Submit Cancel Change Detection
RainerHahnekamp Triggers for Change Detection Handled DOM Events Asynchronous Tasks
RainerHahnekamp 1. Change Detection with Default Strategy = OnPush =
Default 1. Waiting for Events 3. Dirty Marking 4. Change Detection zone.js 2. Event Happens
RainerHahnekamp Change Detection: OnPush • Only checks if Component is
dirty • No dirty marking by asynchronous task!
RainerHahnekamp 2. Change Detection: Click Event in Default Component =
OnPush = Default 1. Waiting for Events 3. Dirty Marking 4. Change Detection zone.js 2. Event Happens
RainerHahnekamp 3. Change Detection: Click Event in OnPush Component =
OnPush = Default 1. Waiting for Events 3. Dirty Marking 2. Event Happens 4. Change Detection zone.js
RainerHahnekamp Criteria markForCheck Immutable Property Binding Handled DOM Events async
Pipe Signal Change (Local Change Detection) manually via markForCheck
RainerHahnekamp 4. Local Change Detection: Signal Change in OnPush Component
= OnPush = Default 1. Waiting for Events 3. Dirty Marking 4. Change Detection zone.js 2. Event Happens
RainerHahnekamp Change Detection in the Future • Careful with OnPush
with zone.js • "Acceptable" with upcoming Scheduler • Simple & Easy with upcoming Signal Components
RainerHahnekamp Further Reading and Watching https://medium.com/ngconf/ngrx-signal-store-the-mis sing-piece-to-signals-ac125d804026 https://youtu.be/0PJPZ3rLqrY