public protocol Reducer
Performs an action on a given state and returns a whole new version.
A store is given a single root
Reducer. As it’s sent actions, it runs the reducer to
update the application’s state. The reducer can have subreducers to separate code
out into modular parts.
For a reducer’s own state and actions, implement the
For subreducers, implement the