I assume that by keeping it flat you mean not having nesting in your state object.
It is not recommended to have nesting in your state, because you need to constantly change state in accordance with some events.
If you look at the reduction documentation, they want you to have clean gearboxes. And part of making your function clean does not change its arguments.
When you have a lot of nesting, it is difficult to change state without inadvertently changing the state object, because all JS objects are passed by reference. When you have a lot of nesting, you must make deep copies of the state object before modifying it.
source share