I am currently re-writing a large desktop app in javascript - specifically, using React / Redux. The number of different Actions reflects the number of different ways that state may need to change. Currently, there are over 350 actions in this application.
The state is complex, and there are interdependencies on many different parts of the state tree, so combining reducers is not possible as the isolated state trees from different root reducers wont work for this application.
Therefore I have one primary reducer, with a switch statement for the actions - consisting of over 350 cases. For each case, I have to cherry pick the bits of the overal state needed, and pass it down to a child reducer explicitly. Most often, this child reducer (itself processing a large numner of action types) hands off to a variety of grandchild reducers and so on. Currently my reducer tree is 5 deep in places.
To add even more complexity, nearly 30% of my actions are asynchronous, so I'm using redux-thunk to deal with these - which is difficult to get right in this scenario.
My question is - is there a better flux implementation to handle this level of complexity, or is there a way to use Redux that is different from the norm, and allows me to manage this action/reducer complexity more easily?
Thanks