back home

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: