Ngrx Component store basics using Angular 12 project

Veröffentlicht am: 15 September 2021
auf dem Kanal: JS Frameworks
2,429
41

Ngrx Component store tutorial - We explore the ComponentStore concept in ngrx to handle local state in components. We initially explore how we can directly use the ComponentStore Service inside the component to create a local state. We use setState method to initialize the store and patchState to partially update it. We also subscribe to the store.select() method to get the updates from the store. After that we explore the updater and effect methods in ComponentStore. Finally we create an angular service which extends the ComponentStore and move all the store related logic to that service.

Mistake in the video - providedIn: 'root' option is not needed in the service CheckboxStore as it is provided at component level providers array.

Github url :- https://github.com/anuroopjoy/ngrx-co...

00:00 - Introduction
02:39 - Install package
03:14 - ComponentStore direct usage
09:09 - Updater method
10:43 - Effect method
13:15 - Service extending ComponentStore


Auf dieser Seite können Sie das Online-Video Ngrx Component store basics using Angular 12 project mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer JS Frameworks 15 September 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,429 Mal angesehen und es wurde von 41 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!