Basic Reducers
In this lesson, we construct a basic reducer.
We'll cover the following
In Redux, reducers are the final stage in the unidirectional data flow
. After an action is dispatched to the store and has passed through all the middleware, reducers receive it alongside the application’s current state. Then they create a new state that has been modified according to the action and return it to the store.
We connect the store
and the reducers
via the createStore()
method, which can receive three parameters: a reducer, an optional initial state, and an optional store enhancer.
Get hands-on with 1400+ tech skills courses.