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

Migration to Signals, Resource API, and NgRx S...

Migration to Signals, Resource API, and NgRx Signal Store

Avatar for Manfred Steyer

Manfred Steyer PRO

October 21, 2025
Tweet

More Decks by Manfred Steyer

Other Decks in Programming

Transcript

  1. @ManfredSteyer Agenda #1 Signals #2 Resource API #3 Effects #4

    SignalStore #5 Mutation API #6 Signal Forms
  2. @ManfredSteyer 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
  3. @ManfredSteyer Component With Signals 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>
  4. @ManfredSteyer @ManfredSteyer 18 • Drawing on a canvas • Manual

    DOM manipulations • Logging • Synching with LocalStore Ideal-typical Tasks Rendering (and similar tasks …) Stuff, you cannot do with data binding
  5. @ManfredSteyer @ManfredSteyer 20 Architecture Rule #1 Derive state where possible

    (sync: computed, async: Resource API) Architecture Rule #2 Avoid effects for triggering business logic! Architecture Rule #3 Reactive Helpers (e.g., Resource API) streamline your reactive flow Architecture Rules
  6. @ManfredSteyer NGRX Signal Store export const FlightBookingStore = signalStore( {

    providedIn: 'root' }, withState({ from: 'Paris', to: 'London', […] }), […] );
  7. @ManfredSteyer NGRX Signal Store export const FlightBookingStore = signalStore( {

    providedIn: 'root' }, withState({ from: 'Paris', to: 'London', […] }), withComputed(([…]) => ({ […] })), withMethods(([…]) => ({ })), withHooks({ […] }) );
  8. @ManfredSteyer Extensions export const FlightBookingStore = signalStore( { providedIn: 'root'

    }, withState({ from: 'Paris', to: 'London', […] }), withComputed(([…]) => ({ […] })), withMethods(([…]) => ({ })), withHooks({ […] }), withResource([…]}), withDevtools([…]}), withUndoRedo(), );
  9. @ManfredSteyer 37 [Social Media] Manfred Steyer [web] ANGULARarchitects.io Manfred Steyer

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