A common way to split responsibilities in an application is to separate them into the three principal layers:
- UI (aka Presentation)
- domain (aka Business)
- data access
Some of the benefits of doing so are:
- a better understanding of the layer’s purpose
- the layer implementation can be replaced. For example we can switch between AngularJS, VueJS, and ReactJS in the UI layer.
- multiple UI Layers can be implemented over the same domain layer
- the UI can be hard to test. By moving the logic to other layers, it becomes easier to test.
Read Functional Architecture with React and Redux and learn how to build apps in function style.
For more on applying functional programming techniques in React take a look at Functional React.