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
Modern State Management in Angular: 3+n Flavors...
Search
Manfred Steyer
PRO
April 10, 2024
Programming
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Modern State Management in Angular: 3+n Flavors of the Signal Store @ijs London 2024
Manfred Steyer
PRO
April 10, 2024
Transcript
40 slides
@ManfredSteyer ManfredSteyer Modern State Management in Angular 3+n Flavors of
the Signal Store
@ManfredSteyer Signal as Producer 4711 Consumer read set notify 4712
@ManfredSteyer Signal Eventually Zone-less!
@ManfredSteyer 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>
@ManfredSteyer from = signal('Paris'); to = signal('London'); flightRoute = computed(()
=> this.from() + ' to ' + this.to()); constructor() { effect(() => { console.log('from', this.from()); console.log('to', this.to()); }); }
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Component Store "Intention" Signals sync/ async computed(…) computed(…)
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Manfred Steyer
@ManfredSteyer
@ManfredSteyer @Injectable({ providedIn: 'root' }) export class FlightBookingFacade { private
state = signalState({ from: 'Paris', to: 'London', flights: [] as Flight[], basket: {} as Record<number, boolean>, }); readonly flights = this.state.flights; readonly from = this.state.from; […] }
@ManfredSteyer @Injectable({ providedIn: 'root' }) export class FlightBookingFacade { […]
readonly selected = computed( () => this.flights().filter((f) => this.basket()[f.id]) ); […] }
@ManfredSteyer @Injectable({ providedIn: 'root' }) export class FlightBookingFacade { […]
updateCriteria(from: string, to: string): void { patchState(this.state, { from, to }) } […] }
@ManfredSteyer @Injectable({ providedIn: 'root' }) export class FlightBookingFacade { […]
updateCriteria(from: string, to: string): void { patchState(this.state, (state) => ({ from: state.to, to: state.from })); } […] }
@ManfredSteyer
@ManfredSteyer export const FlightBookingStore = signalStore( { providedIn: 'root' },
[…] );
@ManfredSteyer export const FlightBookingStore = signalStore( { providedIn: 'root' },
withState({ from: 'Paris', to: 'London', […] }), […] );
@ManfredSteyer export const FlightBookingStore = signalStore( { providedIn: 'root' },
withState({ from: 'Paris', to: 'London', […] }), withComputed(([…]) => ({ […] })), withMethods(([…]) => ({ })), withHooks({ […] }) );
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer export const FlightBookingStore = signalStore( […] withMethods((state) => {
[…] return { connectCriteria: rxMethod<Criteria>((c$) => c$.pipe([…])) }; }), […] );
@ManfredSteyer export const FlightBookingStore = signalStore( […] withMethods((state) => {
[…] return { connectCriteria: rxMethod<Criteria>((c$) => c$.pipe([…])) }; }), […] );
@ManfredSteyer export const FlightBookingStore = signalStore( […] withMethods((state) => {
[…] return { connectCriteria: rxMethod<Criteria>((c$) => c$.pipe( filter(c => c.from.length >= 3 && c.to.length >= 3), debounceTime(300), switchMap((c) => flightService.find(c.from, c.to)), tap(flights => patchState(state, { flights })) )) }; }), […] );
@ManfredSteyer export const FlightBookingStore = signalStore( […] withMethods((state) => {
[…] return { connectCriteria: rxMethod<Criteria>((c$) => c$.pipe( filter(c => c.from.length >= 3 && c.to.length >= 3), debounceTime(300), switchMap((c) => flightService.find(c.from, c.to)), tap(flights => patchState(state, { flights })) )) }; }), […] );
@ManfredSteyer export const FlightBookingStore = signalStore( […] withHooks({ onInit({ connectCriteria,
criteria }) { connectCriteria(criteria); }, }), ); takes: Signal<T>, Observable<T>, T
@ManfredSteyer
@ManfredSteyer const BookingStore = signalStore( withEntities<FlightState>() );
@ManfredSteyer
@ManfredSteyer
@ManfredSteyer Michael Egger-Zikes Rainer Hahnekamp Manfred Steyer
@ManfredSteyer Free eBook (6th Edition) ANGULARarchitects.io/book 20 Chapters 4 new
Signal Store Chapters
@ManfredSteyer Signals: Future of CD Take Care of Data Flow
Stores are the Missing Link Signal Store Lightweight Highly Extensible
@ManfredSteyer
@ManfredSteyer d Slides & Examples Remote Company Workshops and Consulting
http://angulararchitects.io
More Decks by Manfred Steyer
See All by Manfred Steyer
Agentic UI with Open Standards: AG-UI, A2UI, and MCP Apps – When Do You Need Which? @OOP Focus Day 2026, Online
manfredsteyer
PRO
1
55
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
98
Architecture as Executable Contract: Agents Respecting Your Architecture @W-JAX 2026, München
manfredsteyer
PRO
0
170
A2UI as an Architecture Question: Agentic UI Between AI Freedom and Control
manfredsteyer
PRO
0
83
Agentic UI Requires Standards: How AG-UI, A2UI, and MCP Apps Play Together
manfredsteyer
PRO
0
90
AI-Ready Angular Architectures Architecture as Executable Contract
manfredsteyer
PRO
0
110
Human in the Loop Beyond Approval: Toward True Collaboration @FrontMania 2026 in Utrecht
manfredsteyer
PRO
0
110
Agentic UI: Where the Agent meets the User @FrontMania 2026 in Utrecht
manfredsteyer
PRO
0
120
A2UI as an Architecture Question: Agentic UI Between AI Freedom and Control
manfredsteyer
PRO
0
120
Other Decks in Programming
See All in Programming
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
320
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
140
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
980
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
170
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
750
Performance Optimization With LLMs
xleitix
0
260
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
310
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
190
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
260
Spec-driven Development with AI
simas
PRO
0
2.3k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
560
Unsuck your backbone
ammeep
672
58k
Raft: Consensus for Rubyists
vanstee
143
7.9k
Music & Morning Musume
bryan
48
7.5k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
KATA
mclloyd
PRO
35
16k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Deep Space Network (abreviated)
tonyrice
0
410
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
920