im starting a starting a new project with few of my friends, so before we started we were thinking what is the best way to split react/reactnative app into small completely isolated modules,
rules rules rules.
- every module will be developed in its own project, and once finished merged into master
- modules should have no dependencies out side, except for a single Signelton object that will be used to connect all parts togethers
- the main Signelton object, is alson not awware of the modules, they will import him, and register them self.
- UI will be developer separatly, and is not aware of any logic, it just depends on redux to get state.
so to add a new module, will go through process.
- build -Ducks- actions, reducers, constance that set mounting point on redux state, and selectors to define a strict boundries between modules, no module should ever fetch data from state directly but will use selectors;
- build web UI of module
- build mobile reactnative UI of module;
- module register its reducer, and routes with the App main sigelton;
so these are rules we belive will allow us to split work on the whole team, each one will be working on his own module, and we merge into master once finished.
so now how to can we implement :D ? is there a common practice to achive such separation of concerns ?
Aucun commentaire:
Enregistrer un commentaire