I would love to nest a container into another so that i don't end up with loads of code handled by a main page of the application. I feel all this logic should be distributed into lower level containers, but i can't find the best approach to do this. The idea is to have a main container using several containers, each of them with its own logic, reducers, actions, etc, so that the main container doesn't get too hard to manage.
My best approach at this point would be to:
- create a specific selector linking both the mainContainer and the nestedContainer,
- making the mainContainer reducer include the nested containers reducers into the state and
- redux.connecting the nested containers inside the componentWillMount function of the mainContainer.
I feel the process is overcomplicated. Am I missing something? Is this a good practice? Should i keep trying to do this?