If you are working with Redux, the state definition is a key task in the design of your application. Once the state is defined, the reducers are the next step, setting how the state will change according to the inputs received. If your state is too complex, is better to group the logic in two or more reducers and then use something like the following code:

val newState = combineReducers(::reducerA, ::reducerB)(action, oldState)

In this way, the method combineReducers will accept as many reducers needed, connecting the output of one reducer to the input of the next one in the list…

Angel Ernesto Anton Yebra

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store