Effector provides you pretty powerful tooling to migrate all the remaining logic from views to your models(events, effects, stores and its connections in general)
Here are some advices with code examples:
To avoid semantic inconsistency you handle all store updates with original store, not mapped ones since its values will be updated automatically.
Any business logic could be split by models. You should create a folder for each model by its scope of responsibility in
Every model consists of declarations and initialization file. So, declarations is
index.js and initialization file is
Imagine we have another responsibility scope with bigger
index.js, so we had to separate store declarations into
state.js to improve readability
init.js imports all init files from models.
It should be imported in your app root.
Init file in model exports nothing, it only imports events, stores, effects from different models.
This is a place where you initialize your effects and store handlers, to keep other modules pure. Just after that, you start buildling the dataflow of the model (connecting Units aka
Init files as well could contain imports from another models to deal with cross-model business-logic.