A module which represents part of a Reaat app could export an array of routes and a reducer.
export {default as routes} from './routes'
export {default as reducer} from './store/reducer'
The top level application can take these exports and collect them together into the root routes def and the root reducer.
source
├── app
│ ├── components
│ │ ├── SimpleDonut
│ │ │ ├── __tests__
│ │ │ │ └── SimpleDonut-test.js
│ │ │ └── index.js
│ │ └── View
│ │ └── index.js
│ ├── lib
│ │ ├── getEnv
│ │ │ └── index.js
│ │ └── resolveAsset
│ │ └── index.js
│ ├── modules
│ │ ├── beneficiaries
│ │ │ ├── store
│ │ │ │ ├── __tests__
│ │ │ │ │ └── factories.js
│ │ │ │ ├── helpers
│ │ │ │ │ └── index.js
│ │ │ │ └── reducer
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ ├── campaigns
│ │ │ ├── store
│ │ │ │ ├── __tests__
│ │ │ │ │ └── factories.js
│ │ │ │ ├── helpers
│ │ │ │ │ └── index.js
│ │ │ │ └── reducer
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ ├── donations
│ │ │ ├── store
│ │ │ │ ├── __tests__
│ │ │ │ │ └── factories.js
│ │ │ │ ├── helpers
│ │ │ │ │ └── index.js
│ │ │ │ └── reducer
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ ├── errors
│ │ │ └── index.js
│ │ ├── fundraiserCampaigns
│ │ │ ├── components
│ │ │ │ ├── FundraiserSummary
│ │ │ │ │ ├── __tests__
│ │ │ │ │ │ └── FundraiserSummary-test.js
│ │ │ │ │ └── index.js
│ │ │ │ ├── FundraisingProgress
│ │ │ │ │ ├── __tests__
│ │ │ │ │ │ └── FundraisingProgress-test.js
│ │ │ │ │ └── index.js
│ │ │ │ ├── Summary
│ │ │ │ │ └── index.js
│ │ │ │ └── __tests__
│ │ │ │ └── helpers.js
│ │ │ ├── routes
│ │ │ │ ├── Show
│ │ │ │ │ ├── __tests__
│ │ │ │ │ │ └── Show-test.js
│ │ │ │ │ └── index.js
│ │ │ │ ├── __tests__
│ │ │ │ │ └── helpers.js
│ │ │ │ └── index.js
│ │ │ ├── store
│ │ │ │ ├── __tests__
│ │ │ │ │ └── factories.js
│ │ │ │ ├── actions
│ │ │ │ │ ├── __tests__
│ │ │ │ │ │ └── fetchFundraiserCampaign-test.js
│ │ │ │ │ └── index.js
│ │ │ │ ├── helpers
│ │ │ │ │ └── index.js
│ │ │ │ ├── reducer
│ │ │ │ │ ├── list
│ │ │ │ │ │ └── index.js
│ │ │ │ │ ├── show
│ │ │ │ │ │ └── index.js
│ │ │ │ │ └── index.js
│ │ │ │ ├── constants.js
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ └── fundraisers
│ │ ├── store
│ │ │ ├── __tests__
│ │ │ │ └── factories.js
│ │ │ ├── helpers
│ │ │ │ └── index.js
│ │ │ ├── reducer
│ │ │ │ └── index.js
│ │ │ └── index.js
│ │ └── index.js
│ ├── routes
│ │ └── index.js
│ ├── store
│ │ ├── reducer
│ │ │ └── index.js
│ │ ├── constants.js
│ │ └── index.js
│ ├── index.js
│ └── stats.js
├── client
│ ├── index.js
│ └── stats.js
├── config
│ ├── clientEnvRequirements.js
│ └── index.js
└── server
├── components
│ └── Document.js
├── lib
│ └── renderDocument.js
├── index.js
└── stats.js
I reckon we need to put our weight behind something and use it. We can adapt and revise as we go along. For me, we should use the above with the only change being clarification of
handlers