Classes Should Be Small And Only Have A Single Responsibility

TopicSource
๐Ÿงน Clean CodeClean Code - Udemy

Focus your classes to only have one single responsibility.

Don't create a Shop class that handles customers, products, orders, deliveries, โ€ฆ

Instead, create a new class for each responsibility.

Each class should handle a single business case, making it easy to replace and easy to understand.


  1. Functions should be small and do one thing - they should have a single responsibility
  2. SOLID Clean code in React