Transcript
00:00 Alright, now it's finally time to get to more of the traditional conventional reducer that most people are writing. So here's the API that we want to support. We're still doing the object form because typically your reducer is going to be managing an object of state, multiple elements of state on there.
00:16 But our updater function is now called dispatch. And the argument that we pass to it is an object that has a type property as well as any other thing. Sometimes people will add another property called payload and then put additional information in there.
00:34 I don't bother with the payload thing. So we've got our type, increment, and then step. And so then what's cool about this is now we can move all of our logic about what it means to increment into our reducer function. And we can have all sorts of different things that we do inside of our reducer function
00:52 based off of the different events that we're dispatching or these actions that are being dispatched. So that is your objective is to bring us a traditional reducer. Let's go.