Angular 1.x Redux: Handle State Mutations with Reducers

InstructorLukas Ruebbelke

Share this video with your friends

Send Tweet

In this lesson, we are are going to learn how to abstract out state mutations into a reducer. In our current Eggly application, all of the state and business logic for our categories is handled within the categories model. We are going to refactor our code to entirely eliminate the need for our categories model by building out a couple of reducers and seeing how we can interact with them directly. The key thing to notice as we build out our reducers is that a reducer itself is completely stateless because it receives current state every single time it needs to calculate and return the new state. With a clearly defined contract of inputs and outputs, this makes testing reducers really easy which is one of the huge benefits of using this approach.

Paul Binns
~ 8 years ago

Just started on this. Exactly what I have been interested in learning about. I am having one stumbling block however, I am not understanding how webpack is serving the bundle.js. I can't see any kind of generated files once I have gulp running. Could you please direct me to some resources that might explain how this is working?

Lukas Ruebbelkeinstructor
~ 8 years ago

We are using Browsersync to serve up our application which you see in the gulp.serve task. Pay special attention to the middleware tasks that leverage Webpack.

Michael
~ 8 years ago

Where is the code for this module?

Brutalis
~ 8 years ago

look at the code tab, the link to the github page is there. Also make sure to use the branch start.

Brutalis
~ 8 years ago

What kind of plugin do you use for code completion?