Side effects live at the edges of the application.
Cycle.js and Elm which are functional reactive frameworks actually explicitly isolate side effects in things they call ports (Elm) and drivers (Cycle.js) and in the Redux you isolate them in so-called Thunks in Redux middleware.
Currently the best known way to keep a big or continuously growing app maintainable and modifyable.
The developer controls the code. Not the other way round.
✨ " ✨ DEVELOPER HAPPINESS
It started with Flux early 2014. (Actually it started much earlier.)
Now Redux is all the rage (which is a variety of Flux).
But there is also MVI from Cycle.js: MVI is a simple pattern to refactor the main() function into three parts: Intent (to listen to the user), Model (to process information), and View (to output back to the user). — Cycle.js Docs
1. Create action streams (intent / user actions) .fromEvent(), .fromPromise() ... 2. Merge them into one big fat stream of actions (Dispatcher) .merge() or Rx.Subject 3. Filter for what you are interested in, in a store or the model function 4. Map action to reducer / modifier function 5. Scan over the resulting stream of functions by applying each modifier on state