In all the examples the states saved in the store are very simple. The lack of examples for complex states tree lead me to having a hard-time designing mine.
From what I understand, there is no simple way to have arrays of objects having themselves array properties handled by Reducers.
What would be the best way to have houseReducers, roomReducers and entityReducers without flatting them with reduceReducers?
Does something like this looks ok? :
Where wrapReducerProperties would first call the reducers on the properties, then give the resulting state to the reducer given in second parameter.
It feel over-complicated by nicer than having everything flat and reducers taking the root state without really needing it.
reduceReducers(houseReducer, entitiesReducer, ...)
What are your feelings about this? I'm thinking normalising everything, but that mean a lot of conditions to add everywhere to be sure to list what you want. It also do not scale well to have one big bucket when a sub-array is really big. Merging all the sub-arrays into a single one would be very slow in my opinion.
EDIT: Moved code examples into gists