Single Responsibility Principle
S in [SOLID] - A class or component should have a single responsibility. What this means is that a single unit of work such as a class or in the case of React - a component, should focus on doing one thing only instead of taking care of many different functions. It also tells us that a module should have only one reason to change.
Biggest benefits of adhering to the SRP are:
- Clear division of responsibility among small components
- Separate components are easier to test - one component has one responsibility and so there are fewer things to test for
- Reduces time of implementing new functionalities and fixing bugs since they will be contained in a smaller area ___