When a function calls two or more functions and processes each output before sending it over to the next, essentially you are composing logic. When a complex logic becomes difficult to manage and read, one may choose to break it down into smaller functions and call them from the main function. I have seen in the code base of the developers where a function merely does little to nothing before calling the function and returning an output. Makes me wonder is there a need for a function accepting arguments and merely passing to another function?

Why would a person do…


Introduction

Backend developers, often who work with Object-oriented programming languages, are well-versed with the use of design patterns and SOLID principles for better quality, maintenance, and conciseness of the program. This is often left on the sidewalk by the front-end developers when designing the React components. One of the important concepts called “cohesion” is far ignored which causes spaghetti code and the architecture sooner or later starts to smell. …

Afiz Momin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store