Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rethinking Angular: The Future with Signal Stor...

Rethinking Angular: The Future with Signal Store and the New Resource API @JAX 2024 in Mainz

Avatar for Manfred Steyer

Manfred Steyer PRO

May 01, 2026

More Decks by Manfred Steyer

Other Decks in Programming

Transcript

  1. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten Rethinking Angular: The

    Future with Signal Store and the New Resource API ANGULARarchitects.io
  2. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 7 1) Signal

    Graph: Signals and Resource API 2) NgRx SignalStore with Resources 3) DEMO Agenda
  3. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 8 About Me

    (Remote) Angular Workshops and Consulting Google Developer Expert for Angular Blog, Books, Articles, and Talks about Angular Manfred Steyer, ANGULARarchitects.io
  4. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 10 cakes =

    signal(['Sacher Cake', 'Pancake', 'Ice Cream Pancake']); selected = signal(2); selectedCake = computed(() => this.cakes()[this.selected()]); cakeResource = createCakeResource(this.selectedCake); details = this.cakeResource.value; error = this.cakeResource.error; A Simple First Example …
  5. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 21 Unidirectional Data

    Flow Component Store "Intention" Signal sync/ async computed() computed()
  6. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 24 NGRX Signal

    Store export const FlightBookingStore = signalStore( { providedIn: 'root' }, […] );
  7. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 25 NGRX Signal

    Store export const FlightBookingStore = signalStore( { providedIn: 'root' }, withState({ from: 'Paris', to: 'London', […] }), […] );
  8. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 26 NGRX Signal

    Store export const FlightBookingStore = signalStore( { providedIn: 'root' }, withState({ from: 'Paris', to: 'London', […] }), withComputed(([…]) => ({ […] })), withMethods(([…]) => ({ })), withHooks({ […] }) );
  9. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 27 NGRX Signal

    Store export const FlightBookingStore = signalStore( { providedIn: 'root' }, withState({ from: 'Paris', to: 'London', […] }), withComputed(([…]) => ({ […] })), withMethods(([…]) => ({ })), withHooks({ […] }), withResource([…]}), withDevtools([…]}), withUndoRedo(), );
  10. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 31 Architecture Rule

    #1 Derive state where possible (sync: computed, async: Resource API) Architecture Rule #2 Reactive Helpers (e.g., Resource API, Signal Store) streamline your reactive flow Conclusion
  11. •Textmasterformat bearbeiten • Zweite Ebene Mastertextformat bearbeiten 33 [Social Media]

    Manfred Steyer [web] ANGULARarchitects.io Manfred Steyer @ Manfred Steyer Slides & Examples Remote Company Workshops and Consulting http://angulararchitects.io