Many times I face with the following React/Redux structure and I don't understand what are the layers/modules in this case:
-actions folder
--authentication.js
--product.js
-api folder
--axios.js -> for sending HTTP requests
-components folder
--Component1Folder
--Component1.js
--SubSection folder
---Component1SubsectionA.js
---Component1SubsectionB.js
--Component2Folder
--Component2.js
-constants folder
--actionTypes.js -> here are saved the redux dispatch constant variable like: AUTHENTICATION
-reducers folder
--index.js -> containing all of the reducers
--authentication.js
--product.js
-service folder
--socket.js -> creating socket connection
-App.js -> containing React components
-index.js -> Rendering App and provides the redux store
-store.js -> Creating Redux store
In this architecture what are the layers and which modules do they contain?
I thought about this:
Service Layer: contains api module and service module
View layer: contains the components module
Business layer: contains actions, constants, reducers module
Many times axios contains authorization too, then has another layer which is Authentication layer? Or this is just a simple feature.
Another thing which I don't understand is, that components also contains business logic, then they belong to view layer or to the business layer? Maybe the return to the view layer and anything else to business layer?
Am I thinking right? Thanks in advance.