Functions Should Be Small And Do One Thing - They Should Have A Single Responsibility
| Topic | Source |
|---|---|
| ๐งน Clean Code | Clean Code - Udemy |
Doing everything in one huge function makes the function unnecessarily complex and difficult to understand. Split the functionality up into different operations. This gives you the opportunity, to name the new functions according to what they are doing, making it much easier to understand what is going on.
Links
- Clean code - write your code like an author writes a story
- SOLID Clean code in React
- Classes should be small and only have a single responsibility