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
Rainer Hahnekamp
February 29, 2024
Technology
0
190
Change Detection - Deep Dive
Rainer Hahnekamp
February 29, 2024
Tweet
Share
More Decks by Rainer Hahnekamp
See All by Rainer Hahnekamp
ESLint: Low Hanging Fruits
rainerhahnekamp
0
340
Refactoring in Angular via Metrics, Modularity & Testing
rainerhahnekamp
0
330
Testing in 2024
rainerhahnekamp
0
290
Modern Angular
rainerhahnekamp
0
150
Deep Dive: Change Detection
rainerhahnekamp
0
270
Testing Angular in 2024
rainerhahnekamp
0
150
Towards Modern Change Detection
rainerhahnekamp
0
310
Cypress or Playwright?
rainerhahnekamp
0
260
Powerduo Nx and Sheriff
rainerhahnekamp
0
120
Other Decks in Technology
See All in Technology
普通の Web エンジニアのための様相論理入門 #yapcjapan / YAPC Hakodate 2024
ytaka23
4
640
リスクから学ぶKubernetesコンテナセキュリティ/k8s-risk-and-security
mochizuki875
1
290
分析者起点の企画を成功させた連携面の工夫
lycorptech_jp
PRO
1
230
【shownet.conf_】持続可能な次世代Wi-Fi運用に向けて
shownet
PRO
0
260
【shownet.conf_】ShowNet x 宇宙ネットワーク
shownet
PRO
0
310
Authenticator のエミュレーションによる パスキーのログインテスト/nikkei-tech-talk-25
nikkei_engineer_recruiting
0
140
VS CodeでF1〜12キーつかってますか? / Do you use the F1-12 keys in VS Code?
74th
2
280
XPを始める新人に伝えたい近道の鍵
nakasho
1
270
テストコードの品質を客観的な数値で担保しよう〜Mutation Testのすすめ〜
ysknsid25
8
2.5k
【swonet.conf_】NOCメンバーが語るSTMの実態!! ~ShowNetから若者への贈り物~
shownet
PRO
0
230
山手線一周のパフォーマンス改善
suzukahr
0
120
Perlで始めるeBPF: 自作Loaderの作り方 / Getting started with eBPF in Perl_How to create your own Loader
takehaya
1
250
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
249
21k
Testing 201, or: Great Expectations
jmmastey
38
7k
Atom: Resistance is Futile
akmur
261
25k
Build The Right Thing And Hit Your Dates
maggiecrowley
31
2.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
23
1.7k
Web Components: a chance to create the future
zenorocha
310
42k
Side Projects
sachag
452
42k
Designing the Hi-DPI Web
ddemaree
279
34k
How to Ace a Technical Interview
jacobian
275
23k
The Art of Programming - Codeland 2020
erikaheidi
50
13k
Infographics Made Easy
chrislema
239
18k
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