Separation of concerns
Separation of concerns
What is Separation of concerns pricniple?
The most important principle to follow is this separation of concerns. A common mistake is to have all the logic inside a UI Element (like a React Component, Android Activity/Fragment or an iOS View), these UI elements should only contain UI-related logic and bind user interaction to the state holders that then will update the data that the UI shows to the user.