Single model - Multiple controllers
myapp
. If you installed Redux Devtool, you are able to inspect the myapp
states clearly.reducer
(i.e. main
is the current state declared in the reducer) which are exported from controllers. To import a new state, you merely need to add the state into the reducer.increaseCounter
is to compute and return the next state partially which will mutate the current state in slice (i.e. line 38 to build a state and line 44 to catch the next state from increaseCounter
).