The Reducer

We'll delve into the purpose of the reducer. It takes in two arguments: the STATE of the app and an ACTION. The reducer interprets the action and performs changes to the app accordingly.

We'll cover the following...

We will go into greater details pretty soon, but I’ll keep this short for now.

When you hear the word, reducer, what comes to your mind? reduce?

Yeah, that’s what I thought. It sounds like reduce.

Well, according to the Redux official docs:

Reducers are the most important concept in Redux.

widget

Our Cashier is a pretty important person, huh?

So, what’s the deal with the Reducer. What does it do?

In more technical terms, a reducer is also ...