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
Successful with Signals: 3 Effective Rules
Search
Manfred Steyer
PRO
May 27, 2024
Programming
0
120
Successful with Signals: 3 Effective Rules
Manfred Steyer
PRO
May 27, 2024
Tweet
Share
More Decks by Manfred Steyer
See All by Manfred Steyer
Modern Angular with the NGRX Signal Store New Rules for Your Architecture @BASTA 2024 in Mainz
manfredsteyer
PRO
0
10
Modern Angular with the NGRX Signal Store New Rules for Your Architecture @BASTA! 2024 in Mainz
manfredsteyer
PRO
0
81
Successful with Signals: 3 Patterns for Your Architecture
manfredsteyer
PRO
0
72
Native Federation: The Future of Micro Frontends in Angular
manfredsteyer
PRO
0
320
Architectures with Lightweight Stores: New Rules and Options
manfredsteyer
PRO
0
250
3 Effective Rules for Success with Signals in Angular
manfredsteyer
PRO
1
250
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
Where do we go from here? Strategies for Signals
manfredsteyer
PRO
0
200
Successful with Signals: 3 Effective Rules
manfredsteyer
PRO
0
120
Other Decks in Programming
See All in Programming
Rubyとクリエイティブコーディングの輪の広がり / The Growing Circle of Ruby and Creative Coding
chobishiba
1
270
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
110
GenU導入でCDKに初挑戦し、悪戦苦闘した話
hideg
0
160
KSPの導入・移行を前向きに検討しよう!
shxun6934
PRO
0
220
LangChainでWebサイトの内容取得やGitHubソースコード取得
shukob
0
160
Google Sign-inの移行から始めるCredential Manager活用
clockvoid
0
210
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
670
全部見せます! クラシルリワードのSwiftTesting移行プロジェクト
uetyo
0
210
マルチモジュールにおけるテスト最適化
fxwx23
0
210
What you can do with Ruby on WebAssembly
kateinoigakukun
0
160
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
990
LangChainの現在とv0.3にむけて
os1ma
4
910
Featured
See All Featured
The Cult of Friendly URLs
andyhume
76
6k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
Infographics Made Easy
chrislema
239
18k
Optimizing for Happiness
mojombo
375
69k
How GitHub (no longer) Works
holman
310
140k
Ruby is Unlike a Banana
tanoku
96
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.4k
Building Applications with DynamoDB
mza
90
6k
The Invisible Side of Design
smashingmag
295
50k
How to Think Like a Performance Engineer
csswizardry
16
960
What's new in Ruby 2.0
geeforr
340
31k
Transcript
AngularArchitects.io | @ManfredSteyer Successful with Signals: 3 Effective Rules Angular
Warsaw
None
None
None
Agenda • Austrian Desserts • Computed • Effects • RxJS
Interop • Stores
Result • 3 Rules (of thumb) • 2 Hints
About me… Manfred Steyer, ANGULARarchitects.io (Remote) Angular Workshops and Consulting
Google Developer Expert for Angular Blog, Books, Articles, and Talks about Angular Manfred Steyer
Austrian Desserts: Example App
Demo
Computed
Simple Reactivity with Signals Signal 4711 Consumer read set notify
4712
Signal Eventually Zone-less!
flights = signal<Flight[]>([]); const flights = await this.flightService.findAsPromise(from, to); this.flights.set(flights);
<div *ngFor="let f of flights()"> <flight-card [item]="f" /> </div>
from = signal('Paris'); to = signal('London'); flightRoute = computed(() =>
this.from() + ' to ' + this.to());
Demo Branch: 01a-add-signals
Architecture Rule #1 Synchronously derive state where possible
Effects
Demo Branch: 04-effects-starter
Architecture Rule #2 Avoid effects propagating state and signal writes
RxJS-Interop
Demo Branch: 05-rxjs-interop-starter
Hint #1 Signals play well together with RxJS
Hint #2 Avoid Race Conditions (e.g. RxJS and/or loading flag)
Stores
None
None
None
Stores Streamline Reactive Flow Component Store "Intention" Signal sync/ async
computed() computed()
Demo Branch: 07-state-service-starter
Architecture Rule #3 Stores make your reactive flow more manageable
Free eBook (2nd Edition) angularArchitects.io/modern
More: Angular Architecture Workshop • Maintainable Architectures with Modern Angular
• Strategic Design with Nx & Sheriff • Micro Frontends with Module Federation • Signals and Your Architecture: CD & Zone-less, NGRX & Signal Store, RxJS-Interop German Version in June: Online & Interactive angulararchitects.io/workshop-de
Conclusion Architecture Rule #1 Synchronously derive state where possible Architecture
Rule #2 Avoid effects propagating state and signal writes Architecture Rule #3 Stores make your reactive flow more manageable Component Store
Conclusion Hint #1 Signals play well together with RxJS Hint
#2 Avoid Race Conditions (e.g. RxJS and/or loading flag)
None
ManfredSteyer AngularArchitects.io Slides & Examples