Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Change Detection - Deep Dive
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Transcript
20 slides
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
More Decks by Rainer Hahnekamp
See All by Rainer Hahnekamp
Angular Architecture Revisited Modernizing Angular Architectural Patterns
rainerhahnekamp
0
320
NgRx SignalStore: The Power of Extensibility
rainerhahnekamp
0
450
Vitest Highlights in Angular
rainerhahnekamp
0
470
From Hours to Minutes - An AI Case Study with Sheriff
rainerhahnekamp
0
92
RxJS, Signals, and Native Observables: Answering the Critical Questions
rainerhahnekamp
0
66
Zurück in den Browser – Das Comeback der Frontend-Tests
rainerhahnekamp
0
160
From Hours to Minutes: An AI Case Study with Sheriff
rainerhahnekamp
0
280
RxJS, Signals & Native Observables
rainerhahnekamp
0
230
The Road to Angular Today Milestones, Mistakes & Momentum
rainerhahnekamp
0
230
Other Decks in Technology
See All in Technology
kubellの最新データ分析環境
kubell_hr
2
200
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
3
1.7k
マネージャーをエスパーにしない マネジメントされる側から始める、働きやすい現場づくり
comi190327
1
830
専門家に使ってもらうAIプロダクトをつくる - 病院の医事課向けDPCコーディング支援システムの設計と評価
hagino3000
4
950
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
130
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.9k
Context parameters で作る!はじめての型クラス
kworkdev
PRO
1
160
Taking back control of your AI development
inesmontani
PRO
0
300
From vibe coding to reliable (agentic) development
jcabot
0
130
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
460
SORACOM × AWS IoT Core でSREする
butadora
0
120
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
220
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.2k
Done Done
chrislema
187
17k
Paper Plane
katiecoart
PRO
6
55k
Color Theory Basics | Prateek | Gurzu
gurzu
1
530
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
340
Paper Plane (Part 1)
katiecoart
PRO
3
12k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
360
Design in an AI World
tapps
1
390
Balancing Empowerment & Direction
lara
6
1.4k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
580