Now that Angular signals have been out for a while, there are patterns emerging.
In this video, we'll walk through one such pattern for managing state with signals. This Redux-like pattern leverages the best of signals and RxJS.
Links
Code: stackblitz.com/~/edit/rxjs-si...
KZitem video: "switchMap vs concatMap vs mergeMap": • switchMap vs concatMap...
KZitem video: "Unsubscribe with takeUntilDestroyed": • Use takeUntilDestroyed...
KZitem video: "Understanding Immutablity in JavaScript": • Understanding Immutabi...
Josh Morony's KZitem video: "Here's what I've figured out about Angular signals" which also covers a pattern based on Redux: • Here's what I've figur...
Josh Morony's Article: "A New Reactive And Declarative Approach to Angular State Management": modernangular.com/articles/st...
Special Thanks
🌟 To Jason Warner for an early code review.
🌟 To Freddy Montes for reviewing the code prior to publication.
🌟 To Sander Elias for a deep dive into potential enhancements to this pattern. Follow him at: mastodon.social/@sanderelias
Content
00:00 Redux-like pattern
00:20 Sample application
01:38 Define the state
02:23 Set the initial state
03:09 Define the selectors
04:16 Identify the actions
04:56 Define a Subject
05:55 Creating the Observable pipeline
08:59 Defining reducers
12:30 Accessing state from the component
12:48 Kicking off actions from the component
13:35 Following the pattern (again)
16:13 Modifying the component
17:13 Wrap up
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and KZitem content creator. I speak at conferences such as VSLive and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 7,000+) for over 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).
View my KZitem content: / @deborah_kurata
Contact me on Twitter: / deborahkurata
Find my Pluralsight courses: www.pluralsight.com/profile/a...
Access my freeCodeCamp articles: www.freecodecamp.org/news/aut...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular
#angularsignals
#angularstatemanagementwithsignals
#rxjs
#rxjsandsignals
#signalsandrxjs
#angularstatemanagement
#angulartutorials
#statemanagement
#angularwithredux
#angularstatemanagementtutorial
#angularforbeginners
#statemanagementinangular
#angularredux
#angularstatemanagementbestpractices
Негізгі бет Ғылым және технология A Redux-like Pattern for Managing State with Angular signals
Пікірлер: 95